Update several things with a button click

Hello, let me try to explain what I am trying to do: it is a loyalty app for retailers. I’m building an app that will be place in front of the cashier, facing the customer. The customer will input his code and a visit at that store will be computed automatically, just that. Insert the code and get the point.

So, the first step is to login into the account of the store (so that the visit will be computed to that store). So far, so good. What I am having a little trouble is at the next step: the user input the code and it updates a table called visits, recording the consumer code and the store code.

Can you help on how to proceed with that? Looks simple, but Im having a little difficulty (probably because I am new here and still have a lot to learn).

Thank you!

Without seeing your data structure and app editor, I’ll have to make some assumptions. I assume you have two types of user - stores and customers and that a customer gets a unique code when they register. I’ll also assume that your Visits table includes two user fields - one for store and one for customer.

When a customer inputs their unique code, you already know the store, since the store user is signed in. So what I think you need is a workflow step that “Makes changes to a thing” (Visits), setting two fields:

  • Store = current user’s store
  • Customer = Search for customer (code = entered code)'s first item
3 Likes

Thank you! In fact, you’ve described the data structure perfectly. The solution worked out fine, thank you very much!

2 Likes