Maybe it is somehow a Portal to a single record that uses Set Variable and Set Field to create anew and populate?
Use the magic key method.
If you put the popover button inside the portal row, you cannot place a different portal inside that popover as this would be putting a portal inside of a portal.
But there are ways around that with a bit of creative scripting and layout design. If that is the limitation that you have encountered here, let us know and provide a more detailed description of what you want. If I understand what Vaughan is referring to, it's definitely an excellent possibility for what you need here.
1 of 1 people found this helpful
Popovers are a great tool and gives you a large amount of UX experience that where very hard to create before. You can always have a couple of Global fields in your Popover and then a button that users clicks on that fires a script to create a new record in your related table. Then you want create the record until Users really want to
Oh, this is actually ideal (no creation until they are sure)! How do I set this up? Do I use Set Variable and Set Field to submit to record? Do I put the Global Fields in their own table or in the table that the current layout is in?
johanhedman, where do I put the Global fields, and what does the script trigger say? (In their own separate Global table & the script is a Create Record, Set Variable/Set Field, Commit Record thing? Thanks!
Put the global fields into the popover. Use a script with set field steps (no need for variables for data already in a global field) to copy the data from the global fields into the new record. You can use a variable to copy the master table's ID to the related table's match field.
You can put a button named "save" or some such in the popover with the global fields and youv'e got what is essentially a small dialog for creating new records. An "onObjectEnter" script trigger on the popover panel (not the button) can run a different script to clear the global fields so that you always start with empty global fields.
So your script might look something like this if you had two global fields named gFirstName and gLastName inside your popover panel:
Set Variable [$ID ; value: MasterDetailTable::ID]
Go To layout ["RelatedTableLayout" (RelatedTable) ]
Set Field [RelatedTable::MatchField ; $ID]
Set Field [RelatedTable::FirstName ; MasterDetailTable::gFirstName ]
Set Field [RelatedTable::LastName ; MasterDetailTable::gLastName ]
Go to Layout [originallayout]
The above method is the simplest, but not always the best way of creating the related record once you have collected the data in global fields.
I have one global field for the ID of the portal Row. I got one extra relationship based on that global field to that related table. On open I run a script trigger that set the global field and on close in empty the global field and handle change of data