Repeating group - control each button row independently

Hello,

I’m using a repeating group to display on each row one item of a database list field.
My user have a friends database field which count the number of referall he made.

My database scheme :
USER A → LIST OF COURSES
LIST OF COURSES → Title, video link, password…

On each repeating group row, i display the title of one course and a button to got to the course page to see the video.

I’d like to enable or unable the button of each repeating group row independently.
Example :

  • if my current user friend database field > 3, the button of row #1 is enable
  • if my current user friend database field > 6, the button of row #2 is enable

The thing is, when i try to use conditions on my button in the repeating group, it applies to all buttons of the repeating group.
What should i try ?

What conditions have you tried using on the button?

What’s the source of the RG? Let me assume a couple of things:

The RG’s source is this user's List of Courses.
The page’s type is User and the source is the current user.
USER A → LIST OF REFERRALS

Then inside the RG you could put a defaulted to invisible button with a visibility condition if this user's list of referrals: count > 3 for the first button.
The 2nd would be if this user's list of referrals: count > 6.

@adamhholmes thanks.
for example tried to apply “current index is 1 and friends < 3” to toggle the visibility of the second button (this button is not clickable)
the problem is, i can’t control each button clickability based on their index row.

@rico.trevisan thanks for your answer.
so, the only solution is to have multiple buttons on each row ? sounds weird but it might works :slight_smile:

Is not the only solution but a quick one to explain.

Current index refers to the row number. I don’t think this is what you want to use.

It might be useful to share some screenshots or a video of what you’re trying to do.

I might not understand exactly what you are trying to do here, @theo.voglimacci1, but after reading your question, I wanted to see if I could control the clickability of a button in a repeating group based on a number in a field and a row in a repeating group, and these conditions seem to produce the desired result (with the button disabled by default)…

Is that what you are trying to do?

Best…
Mike

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