Webhook, update table with different key value

Hi

I have a app that use uniqueid as a key value for the inspections done on the units. This is done because there are many inspections on each machine but i need to update the child table(asset list) with the date of the next inspection.

The asset list use the fleet number as key value because there can only bee one fleet number per machine.

I have used webhooks to accomplish this on other wrokflows but i need to use the fleet number in the inspections table (not key value) to update the fleet number in the asset list(key value).

If this is possible to do this can you please assist with a JSON template to accomplish this.

Regards
Bart

0 5 123
5 REPLIES 5

Yes, it’s possible and I don’t think you need a webhook to do it unless that’s just what you prefer (I have yet needed to use a webhook across any of the apps I have built)

First, I assume in your Asset List, that each machine is listed only once?

How are you adding the future Inspection Dates to the app? I.e. how does you app know when the next Inspection Date is?

If a user is entering the Inspection Dates, then I would introduce an action upon Save that updates the Asset list with this next inspection Date. If more that one future inspection is added per asset, you could show ALL of them in a list or just the next one. Update it when an Inspection is completed.

If the Inspection Dates are automatic on a schedule, I would use the entry of the “current” inspection to drive the update on the Asset table. Upon Save of the Inspection, introduce an action that updates the Asset’s next inspection date. This actually serves 2 purposes, indication that the current Inspection has been done yet or not and can highlight it if it is late but also waits for the current inspection to be done before updating to the next date so you don’t loose info.

Hi John

Thank you for your reply. I am an inspector of lifting machines that require a load test every 12 months and an inspection every 6 months. I created this app to simplify the process and generate certificates and report of each inspection.

Since then i have learned a lot more about app sheet and the functions. I have automated the dates, machine details and linked the asset list. I have spent a lot of time reading on Appsheet and Appsheet community to get the app to where it is today.

I use to use webhooks to generate a monthly report between apps thus i was under the impression it will be the way to go. I had a look at the action “Data: execute an action on a set of rows” but i will need some guidance since it need to lookup the fleet number and then edit four tables in the asset list (date - next inspection date - next load test - unit status) on that specific row.

The inspection table as a previous date and this is used to calculate the next inspection, so all this is done in the inspection table so for accuracy i would like to transfer it to the asset list.

I need to understand the referenced row field and what this formula should look like. Then i will also need to understand the refenced action or will there be a set value action for each coloum?

This will work perfectly if the option was there to edit a row in a different table

As it turns out, AppSheet has added to this SAME data action the ability to EDIT a row. If you assign the row key and that row already exists, AppSheet will UPDATE the row instead of adding it. The downside is that AppSheet will replace the entire row. If any columns are left blank in your action (i.e. do not need to be updated) those columns will be overwritten. However, you can overcome this problem by simply re-assigning the same value that already exists in the column. This does mean inserting a SELECT() expression into each column you need to simply re-assign its existing value.

Top Labels in this Space