Skip to main content
Question

Compulsory Selection in Multi Select

  • June 21, 2017
  • 0 replies
  • 34 views

I have a multi select field (holding State names) which is a required field when creating a new required.  However, due to organisational requirements, we have to ensure that in some cases, users select two states. Largely this is because our entire business is configured so that one large and small state is looked after by a team.

Is there any way that I could ensure that users always select correct second state?   
This topic has been closed for replies.

  • Quickbase Alumni
  • June 21, 2017
How do you define what is the second state?

  • Author
  • Quickbase Alumni
  • June 21, 2017
Thanks.  We have 5 states.  So we have a combination such as:

WA
QLD
NSW/ACT
SA/NT
VIC/TAS
  
Bottom three should always be in the combination shown. 

  • Quickbase Alumni
  • June 21, 2017
Use IOL with this code:

$("#_fid_6").bind("multiselectclose", function(event, ui){
  var selections = $("#_fid_6").multiselect("getChecked");
  if (selections.length < 2) {
    $("#_fid_6").multiselect("open");
  }
});
If _fid_6 is a multi-select field then the popup selection menu will reopen if less than two selections are made. This should be enough of annoyance that your users will conform. As to picking one large and one small state you would have to code that logic to suit your own needs.

Arshad,

If you always want certain states selected together, why not just make the choices so that the choice only includes the double state, and not allow a drop down choice of them individually.

  • Author
  • Quickbase Alumni
  • June 22, 2017
Thanks Dan. Is there a very simple step by step instructions on setting up IOL? 

Mark I will take this up with you off line.  

  • Quickbase Alumni
  • June 22, 2017
The instructions for setting up IOL are in the Notes field of every record in this application. I added the code in my prior answer here:

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=585