How to save User profile data in different tables?

Hi!

I have an Airtable linked to my Glide app and my issue is that User profile column value is not saved to other tables. At first it is, then it disappears.

  1. I have chosen a “Role” column in my user profile to determine the role of the user.
  2. Every time a user submits info about his prospects from the Glide interface, the app automatically sets column value of the “Row” column of the prospects tabe to the User’s role from he User profile column.
  3. At first I can see that the value is set correctly to Prospects table, however then the info updates and the “Role” column automatically sets to the user’s email.
    Screenshot 2023-10-13 at 14.35.31
  4. When I try to write the same Role or any other User info to different columns of the Prospects table, nothing gets saved.

Does anyone know why this happens?

You have Row Owners applied to your Role column - is that deliberate?

Can you show me a screenshot of your Glide User Profile configuration?

  1. Yes, I set the “Role” column to be the Row owner in the Prospects table according to the documentation Roles

  2. Here you go

Okay, interesting.

I just tried to replicate that behaviour, but I was unable to.

Can you tell me more about how you are setting the Role column when new rows are added to your Prospects table? eg. is it done with a form? if yes, is the Role value passed with the form, or is it done as an onSubmit Set Column Values action? If the latter, that probably explains the behaviour that you’re seeing.

It’s the latter. I set the Role column with an on submit set column. Is there another way to do that, so the user doesn’t know that I’m setting this column for him?

Okay, so that explains it.

The problem is that the row is initially written with an empty value in the Role column, and because that column has Row Owners applied, the user immediately loses access to the row. Which of course means that the onSubmit action fails.

The solution is to pass the Users Role as a User Profile Value with the form.

As a general rule of thumb, it’s best to avoid Set Column Values as an onSubmit action with a form. It’s known to be unreliable. The problem is that every now and then the onSubmit will fire before the new row is added, and so the Set Column Values will fail.

2 Likes

That did help, thank you a lot! :blush:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.