Appsheet API Help

I have a table that we create a PM record on with a PM_Number (equals frequency) 7, 14, 28 day.

From there the save event writes a record of it to the PM_Services there with a formula to calculate the Deadline_Date.

 From there PM_Services rows will either be

Completed (Completed Date added by User)

or 

Expired (If todays date > Deadline_Date) 

I was using an automation to run at 2am every wednesday if completed date is not blank it would change status to Completed and make a copy of that row and add a new row on the PM_service table with a new deadline date for next week. if the completed date was blank it would change the status to Expired and make a copy of that row and add a new row on the PM_service table with deadline date for next week. The issue is with this is the Key column. i am using the following formula 

concatenate(
"PM_Job-",
count(PM_Service[PM_ServicesID])+1
)

 

So When the automation runs it might create 10+ Rows and by doing so it gives them all the same key....

 

Solution i found was using appsheet API however i cant seem to make it work. Here is what i have so far. 

bmayers_0-1674685655301.png

bmayers_0-1674685837913.png

 

 

 

0 3 94
3 REPLIES 3

ICYMI, Serial Numbers, If You Must - Google Cloud Community

Consider revising the convention for a row's key value to not depend on other rows.

Definitely better to set your key values to a UNIQUEID().

But even then, I understand you still wanting a serial number for each record.

I suspect a forEachRow Bot runs all rows in parallel, so unless you set up N different Bots or Steps, it's not going to work.

I suggest setting up a looping action that will iterate across the slice records 1 at a time, creating the new record for each. There are several thorough threads about looping actions in this community that should be easy to find via search.

Thank you i will check out Looping with Actions see what i can get going. I know it be simple and the bots would work if i just used Uniqueid but then when the users tried to find the specific PM-Job they working on it would be a random code that would just be a pain.. 

It is possible im way overthinking it. lol

Anyways i appreciate you both for responding! Ill keep researching. 

Top Labels in this Space