Tpaairman Posted January 21, 2010 Posted January 21, 2010 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)
efen Posted January 21, 2010 Posted January 21, 2010 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
Raybaudi Posted January 21, 2010 Posted January 21, 2010 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 )
Tpaairman Posted January 22, 2010 Author Posted January 22, 2010 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.
Recommended Posts
This topic is 5478 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now