Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Select in Fields and alternate state

I am trying to do a Select in Field based on an alternate state when I activate a sheet. These are the setting I am trying and it is not working. I am using the same states for every sheet, it is just that one sheet uses the field "KPIDeviceGroup" and another sheet uses the "DeviceGroups" field.

SelectInFieldAltState.jpg

I also have another "Select in Field" that sets DeviceGroups to '' in order to clear the filter from the other sheet and that portion is working. It is just the portion where I set the field based on the selection of another field that is not working. And I should also not that this was all working fine before I added the alternate state.

7 Replies
Not applicable
Author

I have tested using simple app to isolate the issue and it is working fine when I select in field with alternate states when I am using a button, but it does not work when I try to use the OnActivateSheet triggers. See attached example. Steps 1 and 2 work, but Step 3 does not work.

Not applicable
Author

Hi Jessica,

your actions on the sheet are not right. Try the below

=MaxString({StateA} Name1Value)

As Name1Value field has two values, it is not assigning the correct values.

Not applicable
Author

Perfect!! Thanks

Not applicable
Author

Shoot, noticed another problem. If there was nothing selected in one of the filters on the main sheet, I need to make sure that there is nothing selected in the filter on the second sheet.  Before I added alternate states I was handling this as: = if( GetSelectedCount(Name1Value), '', Name1Value)

Now I have tried the following and they do not work:

= if( GetSelectedCount(Name1Value), '', MaxString({StateA} Name1Value))

= if( GetSelectedCount({StateA}Name1Value), '', MaxString({StateA} Name1Value))

Not applicable
Author

Another problem with =MaxString({StateA} Name1Value) is that it only uses the last item selected instead of the full list.


IE: if there were two names selected on the first sheet, I want same two to be selected when I choose next sheet.

Not applicable
Author

Try this one

='('  & Concat({StateA} Name1Value,'|')  & ')'

Also We can not use Alternate states in GetSelectedCount , you have to think of handling it in a different way.

jerrysvensson
Partner - Specialist II
Partner - Specialist II

Have you tried using P(), Possible instead of Maxstring(). Should give both values. Have a look in the manual for Set analysis and "Set Modifiers with Implicit Field Value Definitions"