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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,491)