OK, this is a mystery… and it’s driving me crazy. I’m trying to hide a group when a field (“Company”) on the User record = “yes”. But I’m experiencing some erratic behaviour:
When I view the record (set to user=Current Page User) with one user the section is hidden, but when I view the same record with a different user the section is visible? It makes no sense - everything else is the same!
To prove it to myself I put some dynamic text on the record to display the Company field :format as text. Sure enough - the value displays as “yes” when I look at it with one user, and “no” when I look at the same record with the other user??? HOW? WHY?
I believe this has something to do with the use of the Current Page User, but I cannot work it out. One peculiarity about my app is that I have created a way of one user logging in as a Company Account (where Company=‘yes’), but I cannot understand why this would cause the problem I described…
Current user and Current page user are two different thing.
Current page “something” is based on the Data type of the page. In your case, this mean that you have set the data type of the page to User. But it doesn’t mean this is the current user. The user need to be provided to this page so Bubble will be able to check to the user source that may not be the current user (it can be any user of your DB. But the informations about this user need to be provided by a WF for example).
Maybe what you are looking for is to use the Current user (that is the current user logged in your app).
Thanks Jici, but that does not seem to be the issue. Let me try to describe my situation better:
User 1 and User 2 are both looking at User 3’s profile.
My User Data Object has a yes/no field called “Company”
User 3’s Company field is set to “yes”, User 1 & 2’s company field is set to “no”
The page is set to type=User
When the profile page loads, the User 3’s data is sent to the page (and appears in the URL making it the Current Page User if I understand it correctly)
Here’s where it gets odd…
User 1 looks at the page to view User 3’s profile and sees the value of User 3’s Company field=“no”
User 2 looks at the same page to view the same profile but sees User 3’s Company field=“yes”
Essentially they are looking at the exact same record but seeing different data? How can this be possible?
Hi. Yes, it’s hard to explain… (and the possibility I have made a mistake is the most likely one) so let me try to explain… It’s (largely) a single page application