AnsweredAssumed Answered

Beginner Scripting Help

Question asked by flovelett on May 17, 2013
Latest reply on May 17, 2013 by philmodjunk

Title

Beginner Scripting Help

Post

     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).

Steps:

         
  1.           If (type)=”BGE” set (payee2) to “BGE”
  2.      
  3.           Otherwise set (payee2) to value of field (land_other)

     Here is my script:

If [ Intake::type = "BGE" ]

                       Set Field [ Intake::payee2; "BGE" ]

Else

                  Set Field [ Intake::payee2; Intake::land_other ]

End If

      

Comments:

     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.

Result:

     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.

      

     Felicia Lovelett

      

      

      

Outcomes