Update Table 2 from values in Table 1

I have an app that has Client Requests (table 1). When a request is approved a bot takes the values from table one and creates a Client record (table 2, email is the key). If a client submits multiple requests I would like to update the details of the Clients table (table 2) with the values from the Client Requests (table 1).

Example - Client Request Table:
Request One -
Client ID: UniqueID
Client Name: Mary
Client Email: mary@gmail.com
Client Phone: 555-111-1111

Request Two -
Client ID: UniqueID
Client Name: Mary
Client Email: mary@gmail.com
Client Phone: 555-444-4444

When the second request is approved I’d like the phone number to be updated from 555-111-1111 to 555-444-4444 based on matching the key-value field which is “Client Email”.

This is a simple SQL update but I cannot figure out how to do it for the life of me in AppSheet.

Any help would be greatly appreciated!!

jmable:

but I cannot figure out how to do it for the life of me in AppSheet.

I would recommend attaching an action to the Form Saved Behavior on the Request Form.

The action would be of type “Data: add a new row to another table using values from this row”. This action was recently updated (not well published) so that if you specify a row key that already exists, it will update the row rather than add a new one.

CAUTION: There was a post that seemed to imply that if you did NOT specify a value in a column, the existing value would be overwritten. I have not yet confirmed this for myself. If true, it’s easily remedied by assigning a value to EVERY column, though that assignment may not be straight forward depending on the data on hand.

3 Likes

WillowMobileSystems:

CAUTION: There was a post that seemed to imply that if you did NOT specify a value in a column, the existing value would be overwritten.

Correct!

2 Likes