I have a repeating group with content coming from my database of images.
I want to show ALL images to users who have logged in. For the users who have either not logged in or signedup for my application I would like to show only few few images but then LOCK the rest of the images in the repeating group.
Could you kindly advice how to configure this functionality.
You could make an additional datapoint in the database where you have the pictures, for example “logged-in? yes/no”
Then in the repeating group you can either with conditional formatting “lock” the pictures, say they’re there but not visible or you could filter the pictures according to whether your datapoint “logged-in?” ist yes or no.
Another idea is to just show the first 3 to 5 images and not the rest. To do this set the image or group that holds to be hidden. And set a visibility condition to “when current cell’s index < 5 then visible”.
I’d set the initial data source to the data shown to users that aren’t logged in, since it’s the first thing the app will load. In that sense Data Source should be “Search for images: until item #3” and then set the conditional for “When Current User is logged in” (in property, select Data Source) and this data should include all images, “Search for images”.
Now the items more than the set index value shows empty placeholders in that section. On horizontal scroll I don’t see an option for Collapse when empty. Thoughts?
Thats the thing of passing all data and then hiding it, you should always try to pass only the data to show, try my approach and let us know On the other hand make sure your RG setting is for horizontal scrolling and ONLY 1 Column, the element will add all the necesary columns according to the data you have. If you set 5 Columns, the app will always show at least 5 columns.
I reconfigured my data to include a new field to say Show when logged out Yes or No and tagged the data I would like to show when the user is logged out e.g 3 of the 7 images. When user is logged in I would like to show all 7
Now,
I created a repeating group, Horizontal scroll and one column
Added content type image
Grouped the Image inside a repeating group
Question: As I understand you are recommending to not put a condition but do a search under a repeating group?
Data source : Search for images and then put a constraint show images tagged as Yes.