January 21, 201015 yr I have a field that is for distances. The data gets imported from a non FMP database. The other DB puts Mil at the end (for miles) so 100 miles shows up as 100 Mil (space and Mil - 4 characters). I need to lop off the Mil at the end. I was going to use a script, and use the set field, and I was thinking it would be something like Left (text) or Right (text) kind of thing, but neither seems to fit, because I could have any number of characters before the Mil (1 mile or 1000 miles)
January 21, 201015 yr Advanced skill level? Script pseudo code show all records goto first record set field [your miles field; Substitute ( your miles field; your miles field - RightWords ( your miles field; 1 ) )] Loop goto next record, exit after last set field [your miles field; Substitute ( your miles field; your miles field - RightWords ( your miles field; 1 ) )] end loop
January 21, 201015 yr I would prefer to use a simple Substitute. Show all records than put the cursor into your "distance" field. From menu Record make a susbstitute with this calculation: GetAsNumber ( Self )
January 22, 201015 yr Author Thanks for the replys Advanced skill level? Yes. Excuse me that I get hung up on something once in a while. That's why I didn't put expert.
Create an account or sign in to comment