How to update a column in another table when a row is selected?

I'm building an AppSheet app where users can select a Client from the Clients table, and I need to update a field(selected_client) in the Users table to store the selected client for the logged-in user.

Here's what I'm trying to achieve:
When a user clicks on a client in the Clients table, the selected_client column in the Users table should be updated with the client's name.
The update should only affect the row where [Email] = USEREMAIL() (so each user has their own selected client).
Every time a new client is selected, it should overwrite the previous selection.

My Questions:

  1. What is the best way to update a column in another table (Users) when selecting a row in Clients?
  2. Should I use an action inside the clients table to trigger this update, or is a bot enough?
  3. Is there a more reliable approach to store a "session variable" for the selected client per user?

My main goal is to have a app with a navigation structure like this:

Client Selection → 1.0 Menu → 1.1 Submenu KPI Framework → 1.1.1 KPI Framework

I have a table called KPI Framework, which contains a column Cliente that identifies the associated client for each KPI and  I need to display only the KPI data where Cliente = the previously selected client.

Any guidance would be appreciated! Thanks in advance. 

0 1 44
1 REPLY 1
Top Labels in this Space