August 29, 200421 yr I'm trying to get a script to perform 2 find requests for a date range and output the number of records it finds for the combination of those 2 finds. Doing this manually is simple but tedious, and "..." is a valid operator. Why isn't it a valid operator for a script step?? But I'm having more problems than that. I can't even get a simple "find this date in this field and give me the number of records you found" script to work. Here it is exactly: Enter Find Mode [] Set Field ["Date In Listed", "8/22/2004"] Set Field ["Amz 70K", "1"] Perform Find [] Insert Calculated Result [select, "Weekly Listings", "Status(CurrentFoundCount)"] This find doesn't even work WITHOUT the last command. "Date In Listed" is a date field. "Weekly Listings" is a global field. Help!
August 29, 200421 yr To find a date range in a script you need to covert the dates to text and use the Insert Calculated Result script step. Set Field doesn't work. Insert Calculated Result [ Date field, DateToText ( Global Start Date) & "..." & DateToText ( Global End Date)
August 29, 200421 yr Hi Karen, Please update your profile as to which platform, operating system, and version of FileMaker you use, so that we can tailor our answers to fit you situation. Ralph used Global fields in his explanation, the fields could also be date fields, or calculations with a result equal to date. Here are some sample files that may be helpful to you. Date Ranges Made Easy
August 29, 200421 yr The reason for using global fields is that they retain their value when you enter the find mode. Other fields do not have values in the find mode.
August 30, 200421 yr Author > Please update your profile as to which platform, operating system, and version of FileMaker you use, so that we can tailor our answers to fit you situation. Sorry. I updated those when I posted, but somehow they...disappeared. > Here are some sample files that may be helpful to you. Thank you thank you thank you, both of you! (My husband, the FM skeptic, said, "What if the answer is 'you can't do that'? when I posted this last question. I told him, "The answer is NEVER 'you can't do that'. And somebody there will tell me how to fix this and what the hell I'm doing wrong." As usual, you guys came through.)
Create an account or sign in to comment