Does selection group support dynamic panel?

I try to put some dynamic panels in the same selection group and add Click or Tap at each dynamic panel like this:

When i preview the html page, i click the dynamic panel which isn’t be selected, it change to selected correctly, but other dynamic panels doesn’t change to unselected.

I do the same setting on other components like Rectangle, it works perfect that only one rectangle will be selected in the same time.

Is this a known issue? Or i used in the wrong way?

Yes, you can assign selection groups for dynamic panels (DP). If you have any clickable widgets in the DP, it is best to use an external widget (or at least obviously unique manner or event) to change selection state for the DP.

When a DP is selected/unselected, all widgets in it will change selection state accordingly. I don’t find it useful though, for several reasons. There are no selection state events (e.g. OnSelected) for DPs, so selecting one can’t trigger anything (unless it is assigned to a widget inside it, which can get confusing.) Also, when a widget inside a DP has a Click event it gets higher priority than the Click event for the dp, so clicking in various places on the DP can have different results, and perhaps not what you expect.

See this file for a quick demo.
dp selection groups.rp (70.4 KB)

There are two DPs, both assigned to the “myDPs” selection group. Clicking the “Select” button for either will select it, and of course, only one may be selected at a time. This is a basic demonstration of how selection groups work with a DP. Now, the top DP has a few widgets in it, including a Click event for the image widget (which loads a new image), so clicking on it will not change the selection state for the DP. If you click on the “gray background” the DP will be selected because there is no Click event for the background widget so it passes the click up to the DP level (if that makes sense.) The bottom DP has only one widget, a placeholder widget with no Click events, so clicking anywhere on that DP will select it.

Hope this helps with understanding selection groups and DPs.

1 Like

Oh, one other thing I should add… When a widget inside a DP is clicked, it could set the selection state for its DP to “true”. So, in my demo file above, the image in the top DP sets itself to a new image. A second action could select the DP it is in, “dpImage”. Do this for all your clickable widgets to ensure that anywhere the DP is clicked the DP will be selected.

Nice sample, it works perfectly.
I quicky make a sample to explain when my still not working :joy:
dp selection groups_iker.rp (65.5 KB)

First of all, I use 3 DPs to include two states, and i want each DP change its state to state2 when they are selected. Then i put all 3 DPs in the same group named “group1”, i selected DP1 as default and i move his state2 to become the default state.

I think it should work like only one item in this group should be selected, and the selected one should change its state to state2, then others should change to state1.

But when i preview in the browser with the newest version of chrome, i try to click each DP but no one change its state. :sweat_smile:

OK. What you are trying to do makes sense, but because Axure does not have events for selection states of DPs, it won’t work. This is why I say DP selection states/groups are not that useful–at least for conditional logic.

What you are trying to do is change DP states based on selection state, but it turns out you don’t need selection states or selection groups at all. First of all, in your Click events, you are setting the selection state of the DP to “true” and also testing the current selection state. However, the selection state is evaluated (in your conditions) at the time of the click, not after you have changed the selection state (even though your cases for this are sequentially after your first case.) You could fix your logic by swapping the actions in your “IF Selected” and “IF Unselected” but this would only change states for that one DP, not the others. See Page 2 of this updated version for a solution–the most efficient one I can think of.
dp selection groups_iker.rp (91.4 KB)

1 Like


I know how page2 works, but my project was a little game which will add more DPs in the new level, at least it may have over 100 DPs need to be control, that’s why i ask this question.

In that case, i finally moved the rectangle out of DPs and used mouseover style instead of change to another image. It works well with selection group without DP.

The thing confuse me is why DP can’t have “Selected” and “Unselected” event triggers? In my page1, i didn’t found “Selected” and “Unselected” event in DP, so i try to put the logic in Click or Tap and it seems didn’t make sense. :sweat_smile:

I think maybe DP can have “Selected” and “Unselected” events or selection group area should be invisible for DP. It’s really weird when a component which don’t have “Selected” and “Unselected” events allow to join a selection group. If component didn’t support “Selected” and “Unselected” events, it shouldn’t use to be an element of selection group.

For your needs, if you only have two states per DP (or image) then you don’t need a DP. If you have 3 states you can still get by without a DP, but if you have more than 3 states, or if the states need to have different sizes or widgets, then DP works best.

That is a question for Axure support. I don’t understand either.

Totally agree with that!

I wanted to change image, components and visible size of DP at the beginning, i think using DP is better than build components and trigger Show/Hide everytime user click them. And in my project it will auto create lot of these items, i don’t think it can work better without DP. Another reason is i only need to write logic condition cases in DP, it will be easier to maintain.

Wish Axure supporters can describe why DP can’t have Selected” and “Unselected” event triggers, i really want to know that.

In that case, I think your best option is to pick a widget in your DP (or create a new one in each DP) and use its Selected event to control that DP state.

Yes, that’s a solution that i had tried, state change work perfect, but selection group still can’t work correctly when item in selection group are dispersed to different DPs and different states.