1 Reply Latest reply on May 19, 2015 11:52 AM by philmodjunk

    Creating a new record using popover buttons

    MikeProcopio

      Title

      Creating a new record using popover buttons

      Post

      I viewed a youtube video of how to create a new record using a popover button. They mentioned using global fields and creating scripts I assume to copy and paste the data into a new record.I was wondering if there was an easy way to do this.

      Thanks

       

       

        • 1. Re: Creating a new record using popover buttons
          philmodjunk

          Say that you have global fields named Globals::Field1 and Globals::Field2 in your popover.

          A "Save" button in the popover might perform this script:

          New Record/Request
          Set Field [LayoutTable::LocalField1 ; Globals::Field1 ]
          Set Field [LayoutTable::LocalField2 ; Globals::Field 2]

          There might be more needed than that, such as capturing the current record's primary key in a variable, then changing layouts to a layout based on a related table where you then do the new record and set field steps, but then add a set field step that set's the new records foreign key field to the variable's value in order to link the new child record back to the parent record on the original layout.