Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
singbittoo
Creator
Creator

limit selection in multibox

i want a user should be able to select max of three values from the multibox

12 Replies
johnw
Champion III
Champion III

Expanding on this, and this is kind of funky, but rather than clearing the field if you select more than three, you can just prevent the change. Change your clear field to be <=3 instead of >3, then add a Back action after.

  1. clear field =if(getselectedcount(Name)<=3,'Name')
  2. back

As long as you've selected 3 or fewer, it clears the field, then does a back, taking you back to your intended selections. If you've selected more than 3, it doesn't clear the field, so when you go back, it removes your most recent selection that took you over the limit.

There's probably a cleaner way to do it, but that's what I thought of.

Anil_Babu_Samineni

Have you tried my solutions

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
johnw
Champion III
Champion III

I'm not the original poster, but I tried it. You can select as many values as you want. But if you select more than three, then afterwards the list box disappears except for the caption, making it very difficult to make any further changes in selections, such as getting back down to 3 or fewer. You need to do something like clear the field before you can use the list box again.

I didn't understand what you were trying to do with the text object, though, so maybe I've completely misunderstood your suggestion.