2 Replies Latest reply on Apr 15, 2014 7:14 AM by philmodjunk

    Script to navigate to previous field

    MarkMazkot

      Title

      Script to navigate to previous field

      Post

           I would like to create a script that if a condition applies, it would take the active field contents and copy it to a notes field and then navigate back to that original field.  I can get it to copy to the notes field but not to go back to the original filed.

           Any thoughts...below is my script.

      4-15-2014_9-16-50_AM.jpg

        • 1. Re: Script to navigate to previous field
          MilutinPetrovic

               In the Inspector, in the tab "Position" there is, on the top of the inspector, a option to Name a object. Click on Your field and name it something (e.g. "inpField", or in Your case, You can name it the name of the table field it represents) and then, in Your last script step, instead of:

               Go To Object [Object Name: $Field]  set it to Go To Object [Object Name: "inpField"]  or,

               if You name the field the same name as Your table filed, You can leave it the same way You created it in the script!

               It will work fine.

                

               Hope it helps!

          • 2. Re: Script to navigate to previous field
            philmodjunk

                 It would be simpler just to use Set Field instead of the insert calculated result. Steps that start with "insert" put the focus (cursor) into the target field. Set Field does not.

                 Set Field [ Cal Report::Notes ; $Value & " " & Cal Report::Notes ]

                 puts the new note text at the beginning of any text in the notes field.

                 Set Field [ Cal Report::Notes & " " & Cal Report::Notes ; $Value  ]

                 pust the new note text at the end of any text in the notes field.