DimH
Novice

Only allowing 1 choice from multiple choice fields

Jump to solution

Hi, I've got a simple problem where I need to ensure only 1 choice is selected from all the multiple drop downs (which are each connected to Sharepoint Choice fields). So I only want 1 to be selected per form submission.

DimH_0-1631099911622.png

have tried XOR, isNullOrEmpty, and none of them seem to work. They all seem to pass through without enforcing the single choice across the above controls.

DimH_1-1631099927044.png

 Any suggestions on what I'm doing wring or what I should be using to make this work?

 

Many thanks,

Dim

0 Kudos
Reply
2 Replies
Aleximo
Contributor

Re: Only allowing 1 choice from multiple choice fields

Jump to solution

Hey @DimH ,

 

u could do it this way:

 

create 9 formularvariables:

 

Aleximo_0-1631175207653.png

 

for each of ur dropdown create a variable with the formula:

 

IF(URDROPDOWN == "", "0", "1")

 

That means if ur dropdown is empty set the value 0 if not set it to 1.

 

Create one Count variable and set it up like that:

 

Aleximo_1-1631175327682.png

 

in the Count variable u will add up the other created variables (so the values will add up).

 

at the end u will create a validation rule on ur save button:

 

Aleximo_0-1631175673390.png

 

 

that will check if the value of Count is bigger than 1... if its bigger (a user has filled out more than 1 dropdown) then u cant save.

 

hope this helps.

View solution in original post

0 Kudos
Reply
DimH
Novice

Re: Only allowing 1 choice from multiple choice fields

Jump to solution

Excellent, thank you Aleximo - that worked. Just to translate the dialogs to English:

DimH_2-1631229009082.png

 

DimH_1-1631228997440.png

 

DimH_0-1631228972166.png

 

Thanks again for your help 🙂

0 Kudos
Reply