Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

field event trigger, deselection to deselect another

Hi all,

I have an issue whereby I make selections in a list box (A) and I have a trigger which makes the same selection in another list box (B).  However, when I clear list box A, list box B remains selected.  Does anyone know of a trigger that would sort this issue as I thought it would be relatively simple to do.

Thoughts appreciated

Thanks

1 Solution

Accepted Solutions
Not applicable
Author

I found some solution. In my case I needed select on another list box exactly the same value. So I did something like that:
1) in Document Properties (ctrl+alt+d) I chose my field in Field Event Triggers and I clicked OnSelect Add Action(s).

2) I added Select in Field.

3) in Field I wrote name of second list box and in Search String I use this:
=IF( GetSelectedCount(My_field)>0, '(' & CONCAT(DISTINCT My_field, '|') & ')')

and I clicked OK button.

4) I clicked OnChange Add Action(s).

5) I added Clear Field.

6) In Field I wrote: =IF( GetSelectedCount(My_field)=0, 'My_field_2')

7) And that's it. It should work.

Maybe it'll help someone.

View solution in original post

12 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Use alternate states (take a look in help)

Let me know!

simondachstr
Luminary Alumni
Luminary Alumni

Copy the event triggers to be included in OnChange as well.

SunilChauhan
Champion
Champion

use clear all action even trigger

or check if

one value always selected opetion is check

if so un check

it would be avialable in general tab of properties

hope this helps

Sunil Chauhan
Not applicable
Author

Copying the event trigger to on change as well doesn't give any change in the result when deselecting unfortunately.

my trigger for onselect to make selection in B when A is selected works fine, but the deselection does not follow in same pattern.

Not applicable
Author

Thanks,
I don't think alternate states will produce the desired effect.  one field (B) will be hidden but will be selected when field A is selected - I don't see how alternate stats will work when i deselect A to make B get deselected as well.

Not applicable
Author

Hi Sunil,

I don't to clear all though, I just wish to mirror A's selections, i.e. when I deselect A so that nothing in A is selected B also clears it's selection.

Not applicable
Author

Hi Brendan, did you ever sort this out?  I am looking to solve the exact same issue, in the same scenario.

Not applicable
Author

I found some solution. In my case I needed select on another list box exactly the same value. So I did something like that:
1) in Document Properties (ctrl+alt+d) I chose my field in Field Event Triggers and I clicked OnSelect Add Action(s).

2) I added Select in Field.

3) in Field I wrote name of second list box and in Search String I use this:
=IF( GetSelectedCount(My_field)>0, '(' & CONCAT(DISTINCT My_field, '|') & ')')

and I clicked OK button.

4) I clicked OnChange Add Action(s).

5) I added Clear Field.

6) In Field I wrote: =IF( GetSelectedCount(My_field)=0, 'My_field_2')

7) And that's it. It should work.

Maybe it'll help someone.

RGeorgieva
Contributor
Contributor

It works for me. Thank you Monika Piątkowska