cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
seantb
Frequent Visitor

Updating a Multichoice Sharepoint column based on the value in another single choice column

Hi all, 

 

Can you advise if it is possible to update the values in a multiple choice sharepoint column based on the value chosen by the user in a separate single choice column?

 

For example, lets say the multiple choice column has 7 choices (C1, C2...C7) and the single choice column has three choices, but only one can be chosen (SC1, SC2, SC3). Can an expression be created in a flow so that if SC1 is chosen, the multiple choice column would choose C1, C2, C3, C5 and C6, if SC2 was chosen then the multiple choice column might update with C1, C2 and C7 and if SC3 was chosen then the multiple choice column has C1 and C2 chosen. 

 

Any help is really appreciated 🙂 

1 ACCEPTED SOLUTION

Accepted Solutions
seantb
Frequent Visitor

I was able to solve this problem myself by putting the arrays for each multichoice column scenario into compose actions then creating an if(equals(...)) expression referencing each single choice column choice, such that it referenced the correct multichoice array scenario in each situation. This expression was then placed in the multichoice column update item action.

Refer below for my expression. 

 

if(equals(outputs('Create_item_2')?['body/SingleChoiceColumn/Value'],'SingleChoice1'),outputs('MulichoiceArrayCompose1'),
if(equals(outputs('Create_item_2')?['body/SingleChoiceColumn/Value'],'SingleChoice2'),outputs('MulichoiceArrayCompose2'),
if(equals(outputs('Create_item_2')?['body/SingleChoiceColumn/Value'],'SingleChoice3'),outputs('MulichoiceArrayCompose3'),
outputs('MulichoiceArrayCompose4'))))

View solution in original post

3 REPLIES 3
David-
Solution Sage
Solution Sage

Yes, that can be done. Just use a switch with the value from your single-choice field and update the multi-choice field accordingly:

Web capture_7-8-2022_111054_emea.flow.microsoft.com.jpeg

seantb
Frequent Visitor

Thank you @David- , i have seen a switch used and if this is the only way ill use this method, but i was wondering if there was another way to complete this without switch as it would cause my flow, which is already quite big, to get even bigger as I'd have to replicate the following steps in each of the switch conditions. 

seantb
Frequent Visitor

I was able to solve this problem myself by putting the arrays for each multichoice column scenario into compose actions then creating an if(equals(...)) expression referencing each single choice column choice, such that it referenced the correct multichoice array scenario in each situation. This expression was then placed in the multichoice column update item action.

Refer below for my expression. 

 

if(equals(outputs('Create_item_2')?['body/SingleChoiceColumn/Value'],'SingleChoice1'),outputs('MulichoiceArrayCompose1'),
if(equals(outputs('Create_item_2')?['body/SingleChoiceColumn/Value'],'SingleChoice2'),outputs('MulichoiceArrayCompose2'),
if(equals(outputs('Create_item_2')?['body/SingleChoiceColumn/Value'],'SingleChoice3'),outputs('MulichoiceArrayCompose3'),
outputs('MulichoiceArrayCompose4'))))

Helpful resources

Announcements
Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,425)