Jun 9, 2011 #1 mvalley Technical User Joined Mar 4, 2011 Messages 80 Location US I would like to convert a string field into a number if({v_CRA_other_personnel.cr_other_personnel_role} = "2ND SCRUB")then convert this role to a number Is this something that can be done, or am I trying to do the impossible?
I would like to convert a string field into a number if({v_CRA_other_personnel.cr_other_personnel_role} = "2ND SCRUB")then convert this role to a number Is this something that can be done, or am I trying to do the impossible?
Jun 9, 2011 1 #2 fisheromacse IS-IT--Management Joined May 4, 2009 Messages 910 Location US you cannot convert text to anumber. you can assign a number based upon a value in a text field. to build upon your formula: IF ({v_CRA_other_personnel.cr_other_personnel_role} = "2ND SCRUB")then 2 else 0; place this in your details section and it should display a 2 for each time the role is 2ND SCRUB and a 0 for all other roles Upvote 0 Downvote
you cannot convert text to anumber. you can assign a number based upon a value in a text field. to build upon your formula: IF ({v_CRA_other_personnel.cr_other_personnel_role} = "2ND SCRUB")then 2 else 0; place this in your details section and it should display a 2 for each time the role is 2ND SCRUB and a 0 for all other roles
Jun 9, 2011 #3 lbass Technical User Joined Feb 9, 2002 Messages 32,818 Location US If the text field begins with a number, you could use: val({table.string}) ...but this won't work if the number is not the first character. -LB Upvote 0 Downvote
If the text field begins with a number, you could use: val({table.string}) ...but this won't work if the number is not the first character. -LB
Jun 10, 2011 Thread starter #4 mvalley Technical User Joined Mar 4, 2011 Messages 80 Location US Thank you. Fisheromacse's suggestion worked, The text field does not begin with a number. Upvote 0 Downvote