When a new entry is made in a portal, how can I automatically update the date in a field in another table?
Yes through scripting and triggers. This is a general idea.
Get(OpenRecordState) will tell you the sate of your record on the portal: 1 means a new record has not yet been committed. You would need to find the best trigger that would run a script: in this script then you would set a global variable to a value stating a record is being added to the portal.
And when the record is committed, check if the flag states a new record was added and take appropriate actions.
Thank you very much for your quick response. However, I do not quite understand the exact procedure. Can you give tell me exactly how this is done? How exactly would the script look and where do I apply the trigger.
Sorry for my ignorance.
It’s not clear how the records in your portal are related to the layout’s record, nor the relationship of the other table in which you want to affect the date, so here’s another approach (again with limited insight):
Create a script for the creation of the new related record to appear in your portal, rather than making the new related record in the layout’s portal via the relationship (if you happen to be doing so at present ).
Said script would get current records‘s key field and any other needed data for the relationship as variables, go to the related table in an offset window, create the new record and set any needed fields with the captured variables. Commit the new record.
THEN go to the other table you mentioned, either via a GTRR step if it’s related to the newly record created in previous step, or include a find for the desired record, and set/update the date field you need.
Then end the script with closing the offset window, and returning to original layout and refresh the window.
You could also add script steps to navigate to the portal if you need to continue working in the newly created portal row(record), etc.
Hope that helps!
Thanks for your response to my question.
Finally, what I did was to create a script and once I entered something in a specific field, my script does a copy/past into the date field in the other table. It seems to work just fine.
Retrieving data ...