alexliz Posted April 8, 2003 Posted April 8, 2003 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.
RussBaker Posted April 8, 2003 Posted April 8, 2003 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 []
alexliz Posted April 8, 2003 Author Posted April 8, 2003 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!
Ocean West Posted April 9, 2003 Posted April 9, 2003 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
alexliz Posted April 9, 2003 Author Posted April 9, 2003 Thanks, Ocean. The article you recommend looks like interesting reading. Will definitely consider it. Respectfully, Alex.
danjacoby Posted April 9, 2003 Posted April 9, 2003 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).
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now