7 Replies Latest reply on Mar 23, 2017 11:49 PM by philmodjunk

    Transfering spot data

    jlhfbo

      I had a flat data base where I set data from a field; went to another open file and successfully pasted it. I recently did some updating in the three file database and now that STOPPED WORKING!. I have tried the $$Variable but the info is lost when I get to the target file (even though both files are open).  Process: FileA: SetVariable [$$] go to File-B SetField with SetVariable [$$]---no data sets???  Any ideas??

        • 1. Re: Transfering spot data
          Jason Wood

          Global variables do not work across multiple files - never did... but global fields do. You just need a table occurrence in each file for the table that contains the global fields. You don't even need relationships to get to global fields.

          • 2. Re: Transfering spot data
            philmodjunk

            Variables are only accessible in the file where they are created.

            Copying data to the clipboard should work but it is not the best option

             

            Two alternatives:

            1) Add an external data source to your target table from your target file to your source file. Add a table occurrence based on that target table to your source file. Now you can modify data in your target table without changing files and a Variable now works.

             

            2) Add a script to your target file that modifies your target table. Use perform script in your source file to perfom the script in your target file. Pass the data that you want to send to your target table as a script parameter.

            • 3. Re: Transfering spot data
              jlhfbo

              Tried alternative 2): I used a Global-Text-Field in the Source-File; used a Perform-Script that called a script in the Target-File; but can not seem to get and set the data in the Global-Text-Field??

               

              -Jim H

              • 4. Re: Transfering spot data
                philmodjunk

                2) does not use a global field. It uses a script parameter.

                • 5. Re: Transfering spot data
                  jlhfbo

                  Not familiar?? What is a "script parameter"?

                  • 6. Re: Transfering spot data
                    jlhfbo

                    OK---OK---I figured it out. For some reason I was brain blocked to adding the table in the RELATIONSHIP tab, thinking I needed a linking field. Thank you for your patience with me but your efforts did help.... -Jim H

                    • 7. Re: Transfering spot data
                      philmodjunk

                      you might look it up in help.

                       

                      There's a box in the specify script dialog labeled "optional script parameter". This can be a literal value or a calculated expression. On the other side, get (ScriptParameter) retrieves the data passed in the script parameter.

                       

                      Example:

                      Your parameter expression might be:

                      List ( sourceTable:;FieldA ; sourceTable::FieldB )

                       

                      In the other script,

                       

                      GetValue ( Get ( ScriptParameter ) ; 1 )

                       

                      retrieves the first value, the data from FieldA in your source table.

                       

                      If if any of these functions are unfamiliar, look them up in Help.