AnsweredAssumed Answered

Filtering A Find Set

Question asked by herby on Dec 10, 2014
Latest reply on Jan 2, 2015 by herby

Title

Filtering A Find Set

Post

Months have gone by since I (as a 'newbie' successfully adapted the FM Solutions Contacts register as a Membership Register and the Assets Register to my own version of an Assets Register. I’m now back working on the Job Register (the version with the Found Set version that dsvail very kindly set up for me). It works perfectly for me in all respects other than being able to filter the records displayed by the found set to a date selected in a drop-down on the Dashboard layout. 
 
My attempts have each time been stopped completely in their tracks when trying to filter the output selected from the Status drop-down menu so that it only displays records from their start date up to a selected reporting date. Since contacting you last I’ve installed FM Pro advanced - I’ve found this to be extraordinarily useful in developing/adapting the other solutions however, although I’ve stepped through the scripts countless times I haven’t ‘found’ the solution.
 
Here is the Find based on Status script with my comments in bold type. Hate to trouble you folks again after your original sterling efforts but I would be grateful for some advice.
 
All the very best the Holiday season and 2015. 
Best regards, Herby
 
11 December 2014 17:31:58 BMS JOB REGISTER Ver 6.4.fmp12 - Find based on Status -1-
Dashboard_Invoices: Find based on Status
Allow User Abort [ Off ]
Set Error Capture [ On ]
Set Field [ BMS Dashboard::gFoundSet; "" ]
Set Variable [ $$scriptTrigger; Value:1 ]
Set Variable [ $status; Value:BMS Dashboard::gStatus ]
// Go to Field [ ]
Freeze Window
New Window [ Name: "utility"; Height: 1; Width: 1; Top: 1; Left: 1; Style: Floating Document; Close: “Yes”; Minimize: “No”;
Maximize: “No”; Zoom Control Area: “No”; Resize: “No” ]
Go to Layout [ “Utility | Invoices” (Invoices) ]
If [ $status = "All" ]
Show All Records
Else
Perform Quick Find [ $status ]
Set Variable [ $error; Value:Get ( LastError ) ]
If [ $error ]
Set Field [ BMS Dashboard::gFoundSet; "" ]
Close Window [ Current Window ]
Exit Script [ ]
End If
End If
Go to Record/Request/Page
[ First ]
Set Variable [ $id; Value:Invoices::Invoice ID ]
If [ BMS Dashboard::gReport Date ≤ Invoices::Date Started ]
Speak [ Text: True; Voice: “Cellos” ]
[ Wait for completion ]
#HERE IS WHERE I'VE BEEN TRYING TO EXCLUDE THE DESIGNATED RECORD FROM THE LIST ( Have tried OMIT
RECORD / CONSTRAIN FOUND SET without success)
End If
Loop
Go to Record/Request/Page
[ Next; Exit after last ]
Set Variable [ $id; Value:$id & ¶ & Invoices::Invoice ID ]
If [ BMS Dashboard::gReport Date ≤ Invoices::Date Started ]
Speak [ Text: True ]
[ Wait for completion ]
#HERE IS WHERE I'VE BEEN TRYING TO EXCLUDE THE DESIGNATED RECORDS FROM THE LIST ( Have tried
OMIT RECORD / CONSTRAIN FOUND SET without success)
End If
End Loop
Close Window [ Current Window ]
Set Field [ BMS Dashboard::gFoundSet; $id ]
Set Variable [ $$scriptTrigger; Value:"" ]
Exit Script [ ]
 

Outcomes