1 Reply Latest reply on Aug 7, 2012 9:24 AM by philmodjunk

    Perform script vs. go to related table

    Kirk_1

      Title

      Perform script vs. go to related table

      Post

      I switched from the gtrt function to this perform script call,  to see if i can retrieve info between two data bases\files...

      The 1st script below is from the main datat base. I call for it in the second script from the second data base. I don't see my info in the debuggers data viewer... its not working. Can anyone see why?

       

      • Set Variable [ $ozip; Value:Quote::QTOriginZip ]
      • Set Variable [ $dzip; Value:Quote::QTDestinationZip ]
      • Set Variable [ $class1; Value:Quote Description::DTClass ]
      • Set Variable [ $weight; Value:Quote::QTWeight1 ]
      • Set Variable [ $quoteinfo; Value: Let ( [ $params = Get ( ScriptParameter ) ; $param1 = GetValue ( $ozip ; 1 ) ; $param2 = GetValue ( $dzip ; 2 ) ; $param3 = GetValue ( $class1 ; 3 ) ; $param4 = GetValue ( $weight ; 4 ) ] ; "" ) ]

       

      • Perform Script [ “Get quote info ” from file: “Frontier_Logistics_Inc”; Parameter: $quoteinfo ]
      • Set Variable [ $quoteinfo; Value: Let ( [ $params = Get ( ScriptParameter ) ; $param1 = GetValue ( $ozip ; 1 ) ; $param2 = GetValue ( $dzip ; 2 ) ; $param3 = GetValue ( $class1 ; 3 ) ; $param4 = GetValue ( $weight ; 4 ) ] ; "" ) ]

       

        • 1. Re: Perform script vs. go to related table
          philmodjunk

          That would be two tables. A file can contain many tables and a database can consist of many files. Wink

          What relationship (if any) have you defined between these two tables?

          What are the tables called? I see a reference to but one table here: Quote and no reference to any other table.

          I also do not see how these scripts actually do anything. Usually, such a script set's up criteria to perform a find, finds the record or records and then uses a script parameter or a global fields--not variables to transmit the data to the second file. (Variables created in one file cannot be accessed from a second file).

          In your case, the second script appears to pass data in a script parameter using $quotinfo, but does not assign any data to quote info until after the perform script call--which means that no data is passed to the first script shown.

          Please note that you may find scripting this much simpler if in one of the two files, you add a table occurrence to the other file's table and a layout based on that table occurrence. That would allow you to manipulate the data all in one file without having to perform script to call a script in the other file.