How to make Multi user data entry by user capable App for free using Glide?

Hi trying to make a fitness training app where users can enter in date of training by themselves and number of push ups, squats etc they did and save that info under training tab

Doing this using list and normal google sheet is possible but the problem arises when try to hide the user generated data for other users. I have looked at all the ways like row owner, protected column, Etc but unable to figure out how to make the entered data visible only to related logged in user. Also saw some people use columns that are user specific when I changed the columns to that in data structure the user when click add button of the list it no longer shows the field names it showed earlier. For example field names was date, program, squats etc which user would click add and enter data and it saves to google sheet but when put those columns to user specific the add form no longer shows fields to enter that data by user.

How to solve?

Row owners should do it. How did you try to apply it?

See made row id as row owner, also i just put back in the normal columns as well along with user specific ones
https://prnt.sc/WjXtbIMRAN9c

See this is what form looks like of the list when user clicks add new, if i keep only user specific then all these fields disappear;
https://prnt.sc/UZfs82hQCL5J

problem being if i just put in normal columns other users can see this same data

RowID can’t be used to identify a user. It’s just a unique identifier for the row. It has nothing to do with the user that created the row. What you need is an email column. That email column can then be set as a row owner column because the user that signs in with that same email becomes to owner of that row.

To populate the email column automatically, you need to add a user profile component or special value component which will take the email of the signed in user and pass it through the form into your table.

2 Likes

Thanks Jeff for this!

So to get it to work in simple baby steps for anyone else who need do this you need to go and do as follows;
First click the add button of your form of list in layout section of glide
Then now on left hand side find components section and click the black and white plus icon and then in the windows that opens find section called values from user profile
Then select email
And then go to data section of glide make a new column called email put type as email and name as email and untick the user specific column box and save it
Then near column heading you will see black drop down arrow click it then click make row owner

Then when any user submits data it will be populating their user email into a data column called email automatically and since you made that column as row owner what happens is this data user entered will only be visible to the person who owns that email/user profile in your app.

If this answer helped you then please gift me any amount via crypto USDT BEP 20 here 0x08f4720db0f1b38b6b7762d4c24e0fefbc0c64a1

or USDT TRC 20 here TZ8K6QgyFNikesGmQMcM6vENTMgcRsorUk

1 Like

So to get it to work in simple baby steps for anyone else who need do this you need to go and do as follows;
First click the add button of your form of list in layout section of glide
Then now on left hand side find components section and click the black and white plus icon and then in the windows that opens find section called values from user profile
Then select email
Then on left hand side of same page in layout of glide you will see a column was added called email click it then right hand side windows opens in that drop down you need select Email but since we haven’t made an Email column excel we do below steps
And then go to data section of glide make a new column called email put type as email and name as email and untick the user specific column box and save it
Then near column heading you will see black drop down arrow click it then click make row owner

Then when any user submits data it will be populating their user email into a data column called email automatically and since you made that column as row owner what happens is this data user entered will only be visible to the person who owns that email/user profile in your app.

If this answer helped you then please gift me any amount via crypto USDT BEP 20 here 0x08f4720db0f1b38b6b7762d4c24e0fefbc0c64a1

or USDT TRC 20 here TZ8K6QgyFNikesGmQMcM6vENTMgcRsorUk

Wouldn’t be it better use the user id instead? Row ID will remain unique and cannot be change unlike the email id which can be changed especially if your app provides a user profile screen with the option to change the current email id. Also, this will continue to work even other forms of login such as single-on is used.

You can’t use a RowID for row owners unless you’ve established it as a Role column when enabling Role functionality.

It’s also not very easy to change an email due to the amount of data internal to Glide that links to that email address. There would be a bit of manual work by the app developer to get things switched over, so it’s fairly common for an email to remain stable.

You can filter by RowID (User ID), but if security of data is a concern, I would not recommend it. Filters are not secure because all data is sent to the user’s device before it’s filtered. However, row owners guarantees security of the data because only owned rows are sent to the device.

3 Likes

Good to know! Just curious, what would be the steps needed to establish the row id a Role column?

Here is how to configure your user profile.

Here is more information regarding Role functionality.

Here is some general information on securing data.

1 Like

Thanks! But I think I asked the wrong question based on your previous answer. What I really wanted to see is if I can configure the app to use User->Row ID as the row owner in the tables. Turns out it does not work correctly as intended. So using the email id is correct solution for this.

That said, I don’t like the idea of using email id everywhere. Currently the app that I am working has more than 20 tables and I am using User ID in many tables to track who did what. I except that the total number tables needed will double when I complete the app. Fortunately, I do not have any tables yet that need to be restricted based on user. When I do, I will use the email id only for these tables and may be use actions to update them if needed.

Can you explain why it didn’t work as intended?

Like I showed in my screenshot, if you set the RowID column as the role column in your user profile configuration, then you can write the user’s RowID to any new row that’s added in other tables and set that id column as the row owner column.

1 Like

When I tried what you suggested, the UI correctly showed the rows only for the two users I already had before the change. But for the few new users I added after the change, the UI showed the second user’s data when changed the view as option. I noticed the same behavior in the related table as well. The related table has only two rows. First row with the user id of the first user and the second with that of the second user’s. I had set the User ID column on the table as the row owner. If changed that to be email id column then everything worked correctly. Out of curiosity, I changed row owner column on the Users table from email column to row id column and noticed the same behavior.

Another issue is that the role display on the view as dropdown was showing the row id instead of the role names. I can only conclude that changing the role dropdown in user profile only changes which column is used as role. It does not change the behavior of the row owner. I think that the Glide system must hardwired to use the email column for this purpose.

The Role setting in the user profile configuration is ONLY for using with Row Owners. That is it’s only function. Only two types of values can be row owner. That is emails and roles. Nothing else.

If it’s not working correctly, then I have to assume that something is not configured correctly. Can you share screenshots of your user profile configuration, and the columns you have set up in your tables as row owners.

I’ll also note that occasionally weird things will happen when switching who you are viewing as, so it sometimes helps to refresh your browser after applying row owners or switching users.

Now that I think more about this, it is possible that this issue is happening because there was no Row ID column in the Users table when I turned on the Role support. I don’t remember, I could have used the email column as the ID column when I turned on the role support. I added the row id column later when I started to link the user information in other tables to track things. I will test this again on a fresh app, with row id added first.

1 Like

Only two types of values can be row owner. That is emails and roles. Nothing else

Switching the Role setting in the user profile configuration is definitely not working as your described. Here are the screenshots from a fresh app/fresh team.





In the last screenshot you can see the John Doe’s Journals are not visible (even after refreshing the browser couple of times. I wanted to try setting up the Role system again with row id column added first, but it appears that once the role system is activated it is tied to my main login. The option to active role system does not show up when a new team and app is created.

I’ll admit that I’ve never set the RowID as a Role myself, but I don’t immediately see a reason why it wouldn’t work. I will try it out a little later and see if so can reproduce your problem.

A couple things I’m noticing though:

  • It’s hard to tell if Row Owners are taking affect in your table screenshots because you are viewing those as anyone and I can’t tell if unowned rows are being greyed out or not. It would be nice to see what the table looks like when viewing as a user to see if rows become greyed out.
  • I also don’t see a reason for you to set Row Owners on the RowID column in the user table. I would still set it on the email column in that table instead.
  • In your last screenshots,it appears to be working when viewing as yourself. Is there any chance that you have a filter set up on that screen or on the collection that may be causing it not to work for John Doe?

I will try it out a little later and see if so can reproduce your problem.

Thanks!

It’s hard to tell if Row Owners are taking affect in your table screenshots because you are viewing those as anyone

I did that intentionally to show that rows are not getting greyed out when the viewing as anyone. I expected them to greyed out. To answer your question, the row greying behavour matches the screenshot. i.e for the first user only that user’s row is normal and other rows are greyed out correctly. Whereas for the second user all rows get greyed out, which is not correct because the last two rows belong to this user.

Not sure what I’m missing, but with an initial testing it seems to work.

image
image

image

Is there any chance that the Row ID in the user table does not match the User ID in the Journals table? How did you populate that User ID column? Maybe there are extra spaces, or there is a lower case L in place of an uppercase I? I and l are different letters but look the same.