Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Can someone let me know how you can instruct a Script to set the field value for a Perform Find within two global dates? In the SetField script step I can't seem to enter for instance

g_last_date...g_first_date

Thanks in advance.

Posted

You can't use Set Field to enter the result you need for this. Set Field requires the output to be in the format of the destination field. Use Insert Calculated Result instead. Your script would be:

Enter Find Mode []

Insert Calculated result[DateField,DateToText(g_First_Date) & "..." & DateToText(g_Last_Date)]

Perform Find []

Posted

Thanks, Russ! Just before checking back on the forum to see your post I had consulted a reference book on FMP and come across the Insert Calculated Result script step, but hadn't understood the point about converting Dates to Text within the calculation. Everything works just fine now! Thanks again!

Posted

But Insert calculated result does have the limitation that you need to be on the layout with the fileds in quesiton otherwise when you run the script nothing is entered into this field. When dealing with any ranges I strongly recommend use of a plug in or the take the time and add this into your solution, it is worth the effort. http://www.onegasoft.com/tools/smartranges/index.shtml

Posted

Your original script may be faulty. It should read:

SetField(SearchField, g_first_date & "..." & g_last_date

There are two possible problems -- one is not putting the ellipsis (those three dots) in parentheses, and the other is putting the last date before the first (unless that's a typo).

This topic is 7902 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.