# User Data Not Staying Saved

**URL:** https://community.glideapps.com/t/user-data-not-staying-saved/68276
**Category:** Ask for Help
**Created:** [November 30, 2023, 10:04pm UTC](https://community.glideapps.com/t/user-data-not-staying-saved/68276 "2023-11-30T22:04:17Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![vbm](https://avatars.discourse-cdn.com/v4/letter/v/b5ac83/32.png) [@vbm](https://community.glideapps.com/u/vbm)
#### Post date: [November 30, 2023, 10:04pm UTC](https://community.glideapps.com/t/user-data-not-staying-saved/68276/1 "2023-11-30T22:04:18Z")

</div>

**My App/Pages support link:**  
[https://go.glideapps.com/support/bc176537-02e6-4b67-a1ce-c8324d956985](https://go.glideapps.com/support/bc176537-02e6-4b67-a1ce-c8324d956985)

**Describe the bug:**

- When I select or enter data for my users (stored in Glide tables), the data either reverts back to its old value (from “A” to “a” in the case of my own row, for example) or get deleted from the cell entirely within a few minutes.

**Expected behavior:**

- Data should sync between the app & Glide tables

**How to replicate:**

- Create an app with a Users Glide table. Edit a value in one of the columns of one of the rows (a Users table, for example) & assign data to a variable/cell. Wait about 5 minutes. See if the data is still in the cell.

[Updated to reduce confusion - Type of data isn’t really the issue.]

---

<div class="post-metadata">

### Author: ![AdamMartin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adammartin/32/66650_2.png) [@AdamMartin](https://community.glideapps.com/u/AdamMartin)
#### Post date: [November 30, 2023, 10:27pm UTC](https://community.glideapps.com/t/user-data-not-staying-saved/68276/2 "2023-11-30T22:27:08Z")

</div>

You can only set role if the user setting the role has the same role themselves.

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [November 30, 2023, 11:00pm UTC](https://community.glideapps.com/t/user-data-not-staying-saved/68276/3 "2023-11-30T23:00:20Z")

</div>

Changing the category to “Ask for Help” since this is not a bug.

---

<div class="post-metadata">

### Author: ![vbm](https://avatars.discourse-cdn.com/v4/letter/v/b5ac83/32.png) [@vbm](https://community.glideapps.com/u/vbm)
#### Post date: [December 1, 2023, 12:19am UTC](https://community.glideapps.com/t/user-data-not-staying-saved/68276/4 "2023-12-01T00:19:49Z")

</div>

I’m sorry - I’m not following. How does an Admin change the role of a user with lesser access?

And regardless, I guess my question is also regarding the disappearance of edits made directly in the Glide table in the development environment as an admin.

It seems there are app/Glide table sync delays &/or errors of some kind happening in the background. No Internet connection issues, & the change does appear successful for a few minutes before reverting.

So if we had to assume such glitches are inevitable (& not bugs by strict definition), I guess the “how to” question is… How does one reduce the chances of these sync glitches/errors happening?

---

<div class="post-metadata">

### Author: ![AdamMartin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adammartin/32/66650_2.png) [@AdamMartin](https://community.glideapps.com/u/AdamMartin)
#### Post date: [December 1, 2023, 12:44am UTC](https://community.glideapps.com/t/user-data-not-staying-saved/68276/5 "2023-12-01T00:44:57Z")

</div>

There is no such concept of user priviledges that you are thinking of… your glide app does not know whether an “admin” or “master” has more or less control than each other.

The dissapearance you are seeing is because… validation is being done after you submit… that realises you didn’t have the right to set a role to the user… because of the fact that the user you are using does not have the same “role”.

You can get around this by using a new column and setting your role there and then programming your app as needed.

---

<div class="post-metadata">

### Author: ![vbm](https://avatars.discourse-cdn.com/v4/letter/v/b5ac83/32.png) [@vbm](https://community.glideapps.com/u/vbm)
#### Post date: [December 1, 2023, 6:27am UTC](https://community.glideapps.com/t/user-data-not-staying-saved/68276/6 "2023-12-01T06:27:43Z")

</div>

The app has features limited to certain roles because I programmed it that way.

But just confirming - I had a “Role” column. I need to have 2 “Role” columns?

---

<div class="post-metadata">

### Author: ![AdamMartin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adammartin/32/66650_2.png) [@AdamMartin](https://community.glideapps.com/u/AdamMartin)
#### Post date: [December 1, 2023, 6:39am UTC](https://community.glideapps.com/t/user-data-not-staying-saved/68276/8 "2023-12-01T06:39:11Z")

</div>

You can’t use the existing role as you are trying to do (allowing different roles to be set). So you can create a new “role” column (but suggest you call it something else) and then change the logic to use this new column… the result will be the same for your app… but you wont have problems setting the new role as you wish. I would probably make sure that the user setting the role is allowed to though.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [December 1, 2023, 7:34am UTC](https://community.glideapps.com/t/user-data-not-staying-saved/68276/9 "2023-12-01T07:34:35Z")

</div>

Just to clarify a little here…

The only real reason to use User Profile Roles is if you want to use the named roles as Row Owners - either in the same table or other tables. This is a way to restrict which _rows_ of data will be available on each users device, and it allows you to group users together so that they have access to the same set of data rows. For example, consider a business hierarchy where a CEO should have access to all users data, and functional managers should have access to the data of only their direct reports. Roles as Row Owners is a good way to secure data in this scenario. Have a read of the below for a more detailed explanation:

> [@Row owners and roles in the same time?](https://community.glideapps.com/t/row-owners-and-roles-in-the-same-time/45691/5):
>
> No, the users being managed wouldn’t have any role at all. They would just have their own email address as an owner row, which means they would only see their own data. Only the Managers would be given the Manager role, and as a Manager would be set as a Row Owner for every user, they would have access to all data. This might be easier to explain with a picture. Consider the following example: In the example above, the first 3 users are Managers. Each…

When using User Profile Roles, there are general rules about when a role can be set:

- when a user is created, the role can only be set if the creator has the same role as the one they are attempting to set
- when a user record is being edited, the role value cannot be changed under any circumstances.
- in both of the above cases, you might see the change made initially, but as soon as the builder syncs with the Glide back end the change will be reverted (which explains your experience).

There are two workarounds to each of the above:

- manually edit/set the role via the data editor
- use the Glide API

However, if your goal is to just to use “roles” to control tab/screen/component visibility, then it is not necessary to use User Profile Roles. Instead you can use what I like to refer to as pseudo roles. In this scenario you can have a Role column in your User Profiles table, but you don’t set it as such in your User Profiles Configuration. When using pseudo roles, there are no restrictions on setting/changing values. As long as the user making the change has access to the row, they can set the value.

---

<div class="post-metadata">

### Author: ![vbm](https://avatars.discourse-cdn.com/v4/letter/v/b5ac83/32.png) [@vbm](https://community.glideapps.com/u/vbm)
#### Post date: [December 1, 2023, 1:55pm UTC](https://community.glideapps.com/t/user-data-not-staying-saved/68276/10 "2023-12-01T13:55:03Z")

</div>

The user setting the value assigned to the variable is always allowed to. I’m the only user setting these values.

---

<div class="post-metadata">

### Author: ![vbm](https://avatars.discourse-cdn.com/v4/letter/v/b5ac83/32.png) [@vbm](https://community.glideapps.com/u/vbm)
#### Post date: [December 1, 2023, 2:03pm UTC](https://community.glideapps.com/t/user-data-not-staying-saved/68276/11 "2023-12-01T14:03:13Z")

</div>

I have renamed the “Role” column “Pseudo Role” & added a “Role” column as a placeholder in case applicable at some point in the development process. Is this enough, or should I have deleted the original “Role” column & redone all my applicable programming?

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [December 1, 2023, 2:41pm UTC](https://community.glideapps.com/t/user-data-not-staying-saved/68276/12 "2023-12-01T14:41:53Z")

</div>

> [@vbm](#):
>
> The user setting the value assigned to the variable is always allowed to. I’m the only user setting these values.

Do you posses the same Role that you are assigning to your user? If not, then you can’t change it through the app, regardless if you have an “Admin” title or not. At most you may be able to assign the role of “Admin” to another user simply because you also possess that same role.

As has been mentioned a few times now, a user cannot change the native Role if they do not possess the same role themselves. Role functionality is a security feature, so it’s not as simple as changing a value. It’s locked down and can only be changed via the data editor, through an external process, or I believe if the user making the change possesses the exact same role they are changing it to.

> [@vbm](#):
>
> I have renamed the “Role” column “Pseudo Role” & added a “Role” column as a placeholder in case applicable at some point in the development process. Is this enough, or should I have deleted the original “Role” column & redone all my applicable programming?

You need to check your user profile configuration. If you enabled the use of Roles and assigned Roles functionality to a column in your user table, then that column will have further restrictions (mainly the inability to change it’s value via the app). Renaming a column isn’t going to change it’s function. You need to disconnect it through the user profile configuration if you don’t want to use native Role functionality, and instead want to use a Pseudo Role functionality with simple filters and visibility controls.

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [May 29, 2024, 2:42pm UTC](https://community.glideapps.com/t/user-data-not-staying-saved/68276/13 "2024-05-29T14:42:10Z")

</div>

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