I am trying to use the value of a lookup column to display/hide a button. The lookup value points to a text field, with the text value “true”. This value also shows in the lookup column.
However, when I try to use this lookup column in the visibility section for a button (I want to display the button when the value in the lookup column is “true”), it does not work. When I select 'value is empty, it works. This means it considers the value of the lookup column as blank.
Does the table containing lookup value use row owners? The data editor ignores row owners, but the app side respects them. The data editor may not be completely accurate in showing values from rows under row ownership
Are you sure that your screen is pointing to the correct row?
Here you can see an example. The second row has “true” as its value in the left column, and the lookup column on the first row also shows this “true” value.
I have checked the conditions, but they are set up correctly.
I’m not sure I follow. The lookup column is pulling the value from the last row in the same table? How are you getting that lookup value? I assume through a relation? Which relation and how is that relation set up?
The second question, is which row is your detail screen pointing to? Are you sure it’s the first row?
I found the issue, I thought the user-specific column just couldn’t be used in the lookup column, but I wasn’t aware the lookup couldn’t use it in the relation column that the lookup column is using. I have changed it to a regular column, and now it’s working.
I think there is a confusion here: you can use a USC with a Lookup column, no problem with it… the problem is what you will see/get using it.
If you want to have valid values applied to all users or any case (let’s say a “Public” value), you have to use a real/regular column to achieve it. Instead, if you work with USCs the data shown on screen is only valid for the current signed-in user on your APP (“Private” value).
In my “users” table, the user’s email address is set as a row owner. Each user can hold a unique referral ID and an ID for the code they redeemed. I then add a lookup that tells me which user has issued a redeemed ID. If a user is found, an If-statement then returns 1, else 0. I want to use this field as an indicator for the logic on the app side.
As you mentioned in your post, the data editor ignores row owners but the app side respects them. How can I “bridge” the indicator value so that it can be used on the app side then? I’m completely stuck on this since I couldn’t come up with a solution and didn’t find an answer in this community and in the documentation of glide.
Happy to hear your thoughts on this one – if you need more details please let me know!
Many thanks in advance
The only way this would work is if the user you are viewing as or signed in as has ownership of all rows in your User Profiles table. Is this function you are describing some sort of Admin function? If that’s the case, you’d have two options, either:
Create a 2nd Row Owner column in your User Profiles table and populate it with the email address of your Admin user.
Do the same as above, but populate the column with the name of an “Admin” role, and assign that role to any user that needs to be an “Admin”. This second option is easier to manage if you have multiple admins, but there is a cost implication as any users that have roles assigned are counted as private users.
thanks for your reply! To answer your question: There is no specific user type like an admin who has row ownership. Each user is restricted to only accessing the row in which their user data is stored.
Regarding the second row ownership column: I’m not sure how this works – I’m familiar with user-specific columns. Could you please explain what you mean by this and how this might work with the row ownership structure I mentioned above?
hmm, maybe I’ve misunderstood what you are trying to do. Give me some time to watch Bob’s video so I have a bit more context.
In the meantime, tell me - is your goal to determine if any given Referral ID has been used?
If it is, and those codes are in your Users table - which has Row Owners applied - then that won’t work. This is because with Row Owners applied, when a User loads your App, then their copy of the Users table will contain exactly one row - their own. So it will be like all those other rows don’t even exist.
Anyway, let me watch the video and I’ll come back to you. In the meantime, if you can provide any more context or a screen shot or two that would be great.
I am currently able to see, wether or not a redeemed Referral ID of User A matches the issued Referral ID of user B and display that within the row of user A (the one who redeemed this ID).
If a relation to a valid invite is found within this table, the column “New Column” displays a 1, else 0.
I need to use the 1 / 0 on the app side to display different states and use different condition, but this currently doesn’t work probably because the relation_valid_invite doesn’t work with signed-in users due to row ownership. And for this, I need some sort of workaround, or “bridge” to a different sheet where only Referral IDs, their owners, and the relations are managed. But I’m not sure how to build this.
Okay. I just watched Bob’s video, and yeah I can confirm that what he shows in his video will definitely not work if Row Owners are applied to the Users table. The technique is also subject to a race condition that could result in duplicate codes being assigned if two or more users happen to onboard at about the same time (within a few seconds of each other). That’s just something to keep in mind if uniqueness is important for your use case.
Anyway, if keeping row owners in your Users table is a must, then probably what you will need to do is create another table that doesn’t have row owners applied anywhere, and use this to keep a record of all redeemed ReferralIDs. So perhaps columns for the Code, the Date Redeemed, and who redeemed the code… whatever. And then you would just need to modify the action that’s applied when a user redeems a code such that it adds a row to that table.
Just keep in mind that if you want to build any relations from this table back to your users table, again that relation will only ever match one row at most - the row of the currently signed in user.
I configured the text entry to add the Referral ID to the user profile and checked this ID against issued Referral IDs in a table called “invite_ledger”. If the entered ID exists in the column “issued_id”, it returns a value (1) which then can be used as an indicator in the app and to trigger actions. Works like a charm – thanks a lot!