AnsweredAssumed Answered

button actions copied into one script don't work

Question asked by ElenaBerzins on Apr 1, 2014
Latest reply on Apr 1, 2014 by ElenaBerzins


button actions copied into one script don't work


     I'm not very experienced in FM scripting, but I have a 3-4 step process set up using that many separate buttons that I tried to consolidate into a 2 step process (button sets first variable, second button runs the script for remaining steps). The first button (sets variable is used for various things so it has to stay separate).

     The first part of the script - gets the data from a field named EAF_01 (but the last 2 digits change, depending on what line number the user needs).


     When I copied & pasted the button functions into the script, it doesn't work. why?

     1) Set variable (name: $line_num / value: "01" or whatever is clicked) - this is the fixed part

     2) Script I'm attempting:

     Set Variable [$DON_AMT; GetField("LRFA databse 2014::EAF_" & $line_num)]

     Set Field [LRFA database 2014::Donation received; $DON_AMT]

     Go to Layout..... blah, blah blah


     The field "Donation received" just shows as ? when I use the script, but when I use the separate buttons, it works just fine and populates with the data correctly.