Change dynamic panel state for each row in the repeater widget

I have a repeater with a template containing a dynamic panel Item_Category. The dynamic panel has 4 states (AA, 3 stars, 4 stars, 5 stars).
I have a repeater that contains 5 rows (ie. 5 items) and the columns Item_Category & Item_CategoryLabel.
I am trying to set the dynamic panel by calling the Item_Category as the value however this does not return the desired behaviour.

Reference images:

There’s two ways to do this. You can either have multiple cases for the whole repeater (so a case to load a Category Label 1 row, a case to load a Category label 2 row etc). This is relatively quick to set up, but becomes laborious quickly if you have lots of DP states or you want to set multiple combinations of DP/text etc.

The other way is to move your DP by 0,0 in the repeater load, then add an interaction to the DP for the cases - so when it is moved, it checks the value of [[Item.Item_Category]] and sets the DP to the appropriate category. Note that you can’t directly set a DP to a value by name in the same way as you can set a droplist option. You need to check a condition and then use the outcome of the condition to set the DP with a ‘Set Panel State’ action.


Thanks for the input! I have some follow up questions

Option 1:
That means for each case I would need a column in the repeater correct?
How do I link the DP to get it assigned?
I only have 4 combinations (5 stars + label, 4 stars + label, 3 stars + label, label only)

Option 2:
I don’t quite understand this. It seems it provides more flexibility but I can’t figure the exact implementation.
Could you provide me a more detailed explanation for this please?


Hey there

Option 1 - no, you can do this with a single column, but with multiple cases referencing the column. This is quick because you set up your actions to load a row’s contents, then copy/paste it into each case, changing which DP state to set. But it is easy to introduce errors or miss things doing this.

Option 2 - This takes more setup, but it means you can have a single ‘load row’ interaction, then each widget can be evaluated independently inside the row, if you want. I went into how to do this in an extensive example on this thread.

Hi again,

I’ve tried the second option but nothing seems to change;
I’ve attached the original file with my implementation as a reference. Price_configuration_CategoryShare.rp (1.6 MB)

Is there something wrong with the way the interactions are set up? I was looking primarily at the dynamic panel implementation.

You had all your load interactions on the ‘Repeater Loaded’ rather than the ‘Item Loaded’ interaction. This means it will only evaluate once and then do the same thing for every row. Item Loaded goes line by line and evaluates each row individually. In general you would use ‘Repeater Loaded’ for things like resizing or moving pagination around etc.

Price_configuration_CategoryShare-Amended.rp (8.2 MB)

1 Like

Amazing! Completely missed that. Thank you so much that was super useful.
If you’re up for it … I’m facing another small issue in the same prototype that I’ve posted here:

I’d highly appreciate your eyes on that too. Thanks again for the fix on this one!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.