Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

select multiple values in one field when a value is selected in another field

I have two fields of values as shown here:

I need two actions depending on which of the top two values is selected:

  • if Judgment is selected (Field1), clear all of the 2nd field (Field2 - checkboxes)
  • if Pipeline is selected (Field1), select all of the second field (Field2 - checkboxes - as shown above)

I am somewhat familiar with the use of triggers on field events but I'm not sure how to link different actions with different selections.

All help is appreciated, thanks!

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Add a single action of type "Select in Field" to field Field1 (see Settings->Document Properties->Triggers->Field Event Triggers->OnSelect). The action should select in Field2 and the search string is:

=IF (Field1 = 'Judgment', '', '*')

I'm assuming that Field1 has "Always one selected " set here.

Best,

Peter

View solution in original post

10 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Add a single action of type "Select in Field" to field Field1 (see Settings->Document Properties->Triggers->Field Event Triggers->OnSelect). The action should select in Field2 and the search string is:

=IF (Field1 = 'Judgment', '', '*')

I'm assuming that Field1 has "Always one selected " set here.

Best,

Peter

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Is this question related to your other discussion clear other values in a field when one is selected (checkboxes) ?

Not applicable
Author

it is, and I thought about just commenting this question there but I was afraid the trail of responses would get confusing. I am still waiting feedback on which way I need to go aesthetically.

Not applicable
Author

This is wonderful Peter, thank you!! and so much simpler than I thought it would be... the only problem is I've found that when you use Always One Selected Value, AccessPoint locks the value and my users are unable to change it, which defeats the entire purpose.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

That shouldn't happen at all. Always one selected should behave in the AJAX client just like it does in QV Desktop. Are you opening your document in the AP with data reduction?

Not applicable
Author

I have no idea, there is a separate department that handles the QV server and deployment

Not applicable
Author

One more question... I have a total expression that adds up the visible bars and shows the total at the top of the bars like this:

The expression is:

=if(wildmatch(GetFieldSelections([~Bar Selector - TC]),'*Forecasted*'),$(vFCnotdoneEGM),0)
+if(wildmatch(GetFieldSelections([~Bar Selector - TC]),'*Opportunity*'),$(vOpportunityEGM),0)
+
if(wildmatch(GetFieldSelections([~Bar Selector - TC]),'*Identified*'),$(vIdentifiedEGM),0)
+
if(wildmatch(GetFieldSelections([~Bar Selector - TC]),'*Pre-Pipeline*'),$(vPrePipelineEGM),0)

where [~Bar Selector - TC] is the name of Field2

When I click Pipeline (Field1), all of these fields in [~Bar Selector - TC] (Field2) are checked but the total doesn't show unless I uncheck one of the selections and then re-check it.

Thoughts on how to correct this? I need the total bar to show always when Pipeline is checked in Field1, but the value is still based on which boxes are checked in Field2.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

You could create a Text Box that displays the return value of GetFieldSelections([~Bar Selector - TC]). That may shed some light on what is (not) happening when you click Pipeline.

Not applicable
Author

I was able to get around it by putting Judgment and Pipeline in separate fields and then adding a trigger to clear the other when one is selected. When Judgment is selected, it clears Pipeline and ~Bar Selector and when Pipeline is selected it clears Judgment and selects all of ~Bar Selector.

I am going to try your suggestion to see if I can figure out the problem though. Thanks so much for your help!! I'll post it here if I figure it out.