Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5478 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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)

Posted

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

Posted

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 )

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.