Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
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

Tags (1)
1 Solution

Accepted Solutions
Highlighted
Not applicable

Re: field event trigger, deselection to deselect another

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
Highlighted

Re: field event trigger, deselection to deselect another

Use alternate states (take a look in help)

Let me know!

Highlighted
Luminary
Luminary

Re: field event trigger, deselection to deselect another

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

Esteemed Contributor

Re: field event trigger, deselection to deselect another

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

Highlighted
Not applicable

Re: field event trigger, deselection to deselect another

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.

Highlighted
Not applicable

Re: field event trigger, deselection to deselect another

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.

Highlighted
Not applicable

Re: field event trigger, deselection to deselect another

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.

Highlighted
Not applicable

Re: field event trigger, deselection to deselect another

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

Highlighted
Not applicable

Re: field event trigger, deselection to deselect another

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

Highlighted
New Contributor

Re: field event trigger, deselection to deselect another

It works for me. Thank you Monika Piątkowska