3 Replies Latest reply on Mar 5, 2010 10:26 AM by Capt-Tuttle

    Set Field By Name script help please



      Set Field By Name script help please




      Filmmaker Pro10
      Windows XP


      I have a Table recording Test Procedure Data for items under test
      I have a second table listing available Test Equipment and its calibration due dates

      I am trying to make a set of scripts so when a specific field on a specific layout for Test Procedure Data entry is selected, it moves me to a report/layout listing my test equipment. A script there records my selection then moves me back to my Test Procedure layout and populates three fields

       I can do most of this but cannot seem to get the field selection working when I return to the test procedure layout and move the data to the fields I want. This is what I have so far:


      On the test page layout I have a field (Name TD1) that has script trigger set to On Object Enter. The script records the current layout name and active field name to variables and then executes a Go To Layout command:


      Set Variable [$$Last_Layout_Name; Value:Get(LayoutName)]
      Set Variable [$$Last_Layout_Field;Value:Get(ActiveFieldName)]
      Go to Layout [“Test Equipment List”(Test_Equipment_List)]


      The Test Equipment List layout is in Report format

      On this report/layout I have a field that triggers another script. Its intent is to:
      1. Record the Model#, Serial Number, and Calibration Due Date to three global variables
      2. Check to see if the Variable $$Last_Layout_Name has value “Meaning I got here from another layout, and if I did perform the following steps
      2a. Switch back to the original layout
      2b Copy the variables to specific fields (This is what I cannot get to work)

      3 Lastly, null the value of the variable $$Last_Layout_Name
      The script I have been running is:


      Set Variable[$$Device_Part_Number; Value:Test_Equipment_List::Model_Number
      Set Variable[$$Device_Serial_Number; Value:Test_Equipment_List::Serial_Number
      Set Variable[$$Device_Cal_Due_Date; Value:Test_Equipment_List::Calibration_Due_Date
      If [$$Last_Layout_Name = “”]
         Go To Layout [$$Last_Layout_Name]
         Set Field By Name [$$Last_Layout_Field;$$Device_Part_Number] (Doesn’t Work)
      End If
      Set Variable [$$Last_Layout_Name;Value:””]


      I use the Show Custom Dialog command as a debug tool and have verified the $$Last_Layout_Field is TD1

      I went down a path thinking I had to pass a field ID number but could figure that either.

      I think I am close but need a hand