AnsweredAssumed Answered

Automatically Eliminate Record Criteria in Script

Question asked by senriz_1 on Nov 9, 2009
Latest reply on Nov 9, 2009 by senriz_1

Title

Automatically Eliminate Record Criteria in Script

Post

I'm a novice using FMP 9.  I have a layout called Forms, of which I have duplicated as Locked Forms and set all the field behaviors to unmodifiable.  The main Forms layout has a checkbox to lock the form when completed.  I created a script that produces a list for a selected student and displays whether the form is locked or not.  I then created another script, attached it as a button on the list, that allows you to select the form you want and display it in the main Forms layout or the Locked Forms layout based on the Locked Checkbox.  This script does take me to the correct layout with the correct form... but the problem is if a student has an unlocked Form and a Lock Form they both will show up in the found set.  Hence, if I click to go to a Locked Form, on there I can click next record and the unlocked form shows up in the Locked Form layout and the same for unlocked Forms too, it will show a locked form.  I've tried using the Constrain Found Set in my script, but I get "No records found" error.  Below is my script.  I would appreciate any insight into how I can eliminate the unwanted records.  Thanks.   

 

If [ ValueCount (IEP::LockCkBx) = 1 ]

Go to Layout [ “Locked IEP Forms” (IEP) ]

Enter Browse Mode

Adjust Window

[ Resize to Fit ]

Else

Go to Layout [ “IEP Forms” (IEP) ]

Enter Browse Mode

Adjust Window

[ Resize to Fit ]

End If

 

Outcomes