December 5, 20196 yr ow can I add new data to a portal or to a related table?using another layout.? like this one; Edited December 5, 20196 yr by Mark Pastoril
December 5, 20196 yr I'm a little confused, but I'll take a shot. I think what you could do in a script is: Grab the primary key of the record on the main layout. Open a new window on the layout you want to create the related record. New Record Set the foreign key to the variable Enter your data. I'd either cover the entire new layout with a button so a user can only commit the record by clicking your Cancel or Submit buttons, or use a script trigger to prevent committing the record unless the use the buttons. Cancel button runs script to delete or revert record, close window. Submit button commits record, close window You may need a refresh on the portal.
December 10, 20196 yr Author Thanks that works! using this script Set Variable[] New Window[opens the layout that you fill up the data] new record/request set field[] But how about if i use the button in a a portal/or inside the portal?
December 10, 20196 yr Don't quite understand the request. If you put it in a portal row, you would probably want to hide it on any row that has data, and just show it on the blank row, otherwise, every portal row has a button for a new record. Seems more intuitive to pop open the card window, then the user is focused on that specific task to either complete adding the new record or change their mind.
December 11, 20196 yr Basically the button would start a script that would go to that related record in a new card window. If the button is in a blank row, it would grab the primary id of the layout (in a variable), open the card window, new record, set foreign key to primary key variable. Only allow the user to commit via a Save button, or allow the user to cancel (delete record for new record, or undo changes for existing record), commit, close window, maybe refresh first layout or portal.
Create an account or sign in to comment