Conditional Formatting in Nested Repeating Group Based on Clicked Item

Conditional Formatting in Nested Repeating Group Based on Clicked Item

I’m working on conditionally formatting a button in a nested repeating group based on user clicks, and I’m facing some issues with keeping track of the correct item indexes for conditional formatting.

Context:

  • I have a parent repeating group with 30 items, and each parent item contains a nested repeating group with multiple buttons.
  • I want to conditionally format (highlight) the correct button within the nested group when it’s clicked.

Screenshots


What I’m Doing:

  • I’m using two custom states:
    1. fsf_1point_list_index – contains the indexes of the parent group items.
    2. fsf_1point_nested_index – stores the indexes of the clicked buttons within each nested group.

When a button in the nested repeating group is clicked:

  • fsf_1point_list_index gets updated with the index of the parent group item.
  • fsf_1point_nested_index gets updated with the index of the clicked button within that nested group.

For example, after clicking:

  • fsf_1point_list_index might look like: [1, 2, 3, 4, 5, 6] (parent group items)
  • fsf_1point_nested_index: [1, 2, 1, 1, 1, 1] (nested button indexes)

This means:

  • Parent item 1, clicked button 1
  • Parent item 2, clicked button 2
  • Parent item 3, clicked button 1, etc.

The Issue: I need help figuring out how to apply conditional formatting to highlight the correct button (i.e., the specific button clicked) inside the nested repeating group. I’m struggling with constructing the right condition for this.

Any advice or a better approach to achieve this would be greatly appreciated!

Couldn’t you make the list more unique? For instance instead of 1, 2, 3... let it be knob-1, knob-2, knob-3...? I could imagine that being easier to target.