Skip to main content
Solved

Push Script Changes to Newly Created Entry


Forum|alt.badge.img+3

Hey Everyone, 

Quick explanation of what I'm trying to do is: I created a couple fields to look at the number of items in a particular category, count those items, add 1 to the count, merge a few string fields together to create a unique identifier "YP Internal Code" (see 'write to cell' image) when a record is created via form.

I'm passing an input variable to the script shown (see 'push to table' image), but can't figure out what the next step is to push the changes in the script to the table itself after the assignment of the new internal code to the old one. 

Thanks for the help, 

Peter

Best answer by TheTimeSavingCo

I recommend you check out the documentation for this found here

You'll need to add a reference to the record ID you want to update as well

---
From your screenshots it seems you could solve this without scripting as well

You could create an automation that triggers when 'Collection Code Counter' is not empty and 'YP Internal Code' is empty, and its action would be to update the triggering record's 'YP Internal Code' field with the value in 'Collection Code Counter'

View original
Did this topic help you find an answer to your question?

2 replies

TheTimeSavingCo
Forum|alt.badge.img+28

I recommend you check out the documentation for this found here

You'll need to add a reference to the record ID you want to update as well

---
From your screenshots it seems you could solve this without scripting as well

You could create an automation that triggers when 'Collection Code Counter' is not empty and 'YP Internal Code' is empty, and its action would be to update the triggering record's 'YP Internal Code' field with the value in 'Collection Code Counter'


Forum|alt.badge.img+3
  • Author
  • New Participant
  • 2 replies
  • February 7, 2023

Thanks @TheTimeSavingCo - took the more simple route and just used an automation, but I'll still check out the documentation for updateRecordAsync. Thanks for pointing me in the right direction. 

Peter


Reply