Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to restrict the number of Field selections on List box

I have a scenario where the user should select only 6 months  at a time where the list box display 12 months.Please help.

1 Solution

Accepted Solutions
Kushal_Chawda

Hi,

Dont' need to hide or conditional display messages. You can simply use field event triggers.

Please see the  attached.

View solution in original post

9 Replies
maximiliano_vel
Partner - Creator III
Partner - Creator III

Please check this linkg at QlikViewCookBook From Rob Wunderlich

Search Recipes | Qlikview Cookbook

Look for Date Grouping

However all attach an example... You can adapt it to your needs

ogster1974
Partner - Master II
Partner - Master II

could you add half year field to your master calendar? so Jan-Jun as one option Jul-Dec as the other.  you could include quarters to.

regards

andy

antoniotiman
Master III
Master III

In Property -> General check Hide Excluded Values

Immagine.png

Anonymous
Not applicable
Author

My requirement is to display only months and when user selects more than 6 months then the sheet should clear the selections.Data could be related to any 6 months so range wouldn't be a solution .I tried using document trigger and variable but it is not working.

Anonymous
Not applicable
Author

Thanks for the info,I will try that solution.

maximiliano_vel
Partner - Creator III
Partner - Creator III

Perhaps you could use another approach???.....

See attached file

tamilarasu
Champion
Champion

Hi,

You need to create a event trigger and then create an On Select action for the required field.


Settings -> Document properties ->Field Event triggers - > On Select -> Action - >Select in Field

Field - type as Year (Field Name) and Search string =if(GetSelectedCount(Year)>6,Null(),'=Year')


Capture.PNG


Check the below attachment. ! !


Let me know whether this is fine or not.


EDIT: If you wants to select exactly 6 selections, then alter the expression like below

'=if(GetSelectedCount(Year)<>6,Null(),'=Year')'

scriptina.jpg

svenkita
Creator II
Creator II

try selecting over 6 months and it will give you a message

it will also have the variable show error

if the user selects less than or equal to 6 months than the dates in the variables

dStartDate

&

dEndDate will show properly

Hope this helps

Kushal_Chawda

Hi,

Dont' need to hide or conditional display messages. You can simply use field event triggers.

Please see the  attached.