AnsweredAssumed Answered

Script help for double find and sort

Question asked by precociousninja on Aug 19, 2010
Latest reply on Aug 23, 2010 by precociousninja

Title

Script help for double find and sort

Post

Hi I am still not as good with filemaker as I should be and I am trying to write a script that runs two finds and then sorts the results.  One of the finds and sorts works perfectly yet when I tried to add the second find, I cannot seem to get the script to work.  

Here is the specific situation.  I need the first find to  find all records that are related to "Band A" while the second find finds all records whose "date is > today"  then I need all the records sorted from today (if no record shows today, then it shows the next date there is a record for) into the far future in order.  

Right Now, my script looks like this:

Enter Find More []
Set Field [show::date_show[">=" & Get ( Current Date)]]
Set Error Capture [On]
Perform Find [Restore]
Sort Records [Restore; No Dialog]
Go to Record/Request/Page [First]

I have tried the following find for the script "show:: artist: [Band A]" alone as well as two finds in the find section.  The two being: "show:: artist: [Band A]" as well as "show::date_show: [>=//]"

The sort is by "date_show" (ascending).  

I have them set up to be triggered upon layout load yet when I open the layout, I get all records from Band A not just today into the future.  So records whose dates are as old as 1996 are showing up upon layout load.  

Does anyone see where I am making the error(s)?  Thanks in advance.

pn

Outcomes