Beginner Scripting Help
I’ve never written a script before and need a bit of help. I'm slowly working my way through FilerMaker Pro 12: The Missing Manual, but haven't gotten to scripting yet.
Problem: users are tired of manually entering a value for a field (payee2).
Solution: the value of (payee2) could be automatically assigned depending on the value of the field (type).
- If (type)=”BGE” set (payee2) to “BGE”
- Otherwise set (payee2) to value of field (land_other)
Here is my script:
If [ Intake::type = "BGE" ]
Set Field [ Intake::payee2; "BGE" ]
Set Field [ Intake::payee2; Intake::land_other ]
Used a script trigger OnLayoutEnter to invoke the script whenever a certain layout was chosen, but uncertain if this was the best solution. Also uncertain if the Set Field command was the best way to assign the value to the field.
The script only entered values in (payee2) in two records instead of ALL the records in the found set. Clearly I've missed something.
Any help truly, truly appreciated.