Hide/show user profile due user profile setting

Hi!
I created two different pages, the first one is a home page that shows all the users registered and the second one is a setting page where users can set their preferences.
The main preference is to decide if show or hide the profile on the home page.


This is a repeating group on the home page that shows users’ profiles.


This is the setting profile with a switch button to set the user’s preference.
When the user clicks the button it changes a field data value “yes/no” on the database.

I don’t know how to hide/show users’ profiles on the home page related to this user preference.
I tried a lot of things, but the closer result I gained is to hide all the profiles in the home.
I only want to hide/show the single profile associated with the user.

Hi there, @ivan.rss92… if I understand your post correctly, a privacy rule is likely the way to go here. I’m guessing you have a Profile data type, and that data type has the yes/no field for visibility. If that is the case, add a privacy rule to the Profile data type that says when the profile’s creator is the current user or the profile’s visibility is set to yes, the profile can be found in searches and its field can be viewed. Then, leave all of the boxes unchecked for the Everyone else section of the rule, and you should get the desired result.

Hope this helps.

Best…
Mike

I tried, but still doesn’t work.
These are my rules

Where “Show profile” is the related field to user choice.
image

Maybe I have also to repeating group? But I don’t know what to set

Okay, so everything is on the User data type.

Your Hide Profile and Show Profile rules directly contradict each other. Try deleting the Hide Profile rule, and uncheck everything for Everyone else.

Also, the Show profile field isn’t set to yes for any of the records in that tiny screenshot, so that would be a problem, too.

This topic was automatically closed after 70 days. New replies are no longer allowed.