Dynamic panel condition trigger

Hi All
how are you?
please look attached file/

I have a list of dynamic panels with names, 2 buttons and 4 messages
(2 good feedback, 2 error messages).

i want to choose one or more dynamic panels names, click one of the buttons below and get a good feedback. And when i click the buttons bellow without choosing first one or more dynamic panels names, i want to see the error messages.

I know little of conditions. i really need your help here.
thank you

how to do.rp (209.7 KB)


See this update for some solutions.
how to do.rp (549.3 KB)

The Solution 1 page adds conditions for your buttons to show the proper lightbox message depending on whether at least one name is selected. First of all, I set your lightbox message widgets to automatically hide themselves. See their OnLoad events. I added an OnShow event to move the message to the center of the names list so they appear consistently. If any of the *_legend dynamic panels are selected–meaning they are in “State 2”–then the good feedback message is shown. Otherwise, the appropriate error lightbox is shown.

To create this, I open the Case Editor dialog and click “Edit Condition”. I set a condition of “state of panel” and picked one of your dynamic panels, then set it up for “equals state State2”. I repeated this for the four dynamic panels in your list and finally selected “Satisfy any of the following” so if any one of the four dynamic panels are in State2 this condition will be true:

Here is the interaction code for your “create group” button:


I copied this to the “ask help” button and changed which lightbox message would be shown.

The Solution 2 page is another way to approach your name list. Rather than duplicating everything (heart, name, avatar shape, etc.) twice just to show a selected state, you could simplify things by setting the *_legend group to selected state of “toggle” to swap selection states on click. Then if you want to change “simon” to “sally” or add new items, it is much easier to maintain. I also collapsed all your lightbox groups to one dynamic panel so they would show consistently. …Just a little different way to do things.

The Solution 3 page is another approach that uses a repeater for your list of names. Repeaters let you design one item and duplicate it many times so maintaining your list is more efficient and flexible. To track if any repeater row is selected, I made a global variable, named, “SelectedNames”. When a row is clicked, it toggles the selection state of the background. When selected, it increments SelectedNames, and when deselected it decrements it. The button condition becomes very simple:


wow! and again…wow!
thank you very much for your help.
I’m reading this now and following the steps.
thank you for your patience!
i hope someday i’ll be able to help someone else here too :slight_smile:

thank you again