cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mathwari
Regular Visitor

Create SharePoint list item based on Choice filed value

Hello,

 

I have a SharePoint list with Choice filed where we can select multiple choices, lets assume the field name is "Company" with values (A, B , C).

is it possible to create a SharePoint list item for every selected values. for example, If I created an item and selected company A and B, then a separate entry should be created for every company.

2 ACCEPTED SOLUTIONS

Accepted Solutions
efialttes
Super User III
Super User III

Hi!

Let me see I understood your requirements with a example

So, an item is created with multichoice values A and B.

You wanna design a flow that would create two new items, one with multichoice value A and the other with multichoice value B, right?

If so, for sure it is possible.

TRigger 'When an item is created'

Now you need a condition to evaluate nr of multichoice values, if less than 2 stop processing.

A length() based WDL expression should do the magic

 

In my example sceenshot I am assuming there is at least one value assigned to the multichoice column, and the column name is called Tags

Flow_NrOfMultichoiceValues.png

 

Hope this makes sense

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

 

 

Following is my test result:

1.PNG

Same title, different company.

 

 

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

12 REPLIES 12
efialttes
Super User III
Super User III

Hi!

Let me see I understood your requirements with a example

So, an item is created with multichoice values A and B.

You wanna design a flow that would create two new items, one with multichoice value A and the other with multichoice value B, right?

If so, for sure it is possible.

TRigger 'When an item is created'

Now you need a condition to evaluate nr of multichoice values, if less than 2 stop processing.

A length() based WDL expression should do the magic

 

In my example sceenshot I am assuming there is at least one value assigned to the multichoice column, and the column name is called Tags

Flow_NrOfMultichoiceValues.png

 

Hope this makes sense

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

thank you very much for your reply

 

you got me correctly.

 

the condition if less than 2 stop processing is clear but how about making the another part of condition which is if it is more than 1.

 

appreciate if someone can help me with the solution 

Hi!

On the remaining branch, I would add an 'Apply to each', assign as its input the multichoice column from dynamic content menu. 

Inside the 'Apply to each' I would add the 'Create item', assign as the input for the multichoice column the following WDL expression:

 

item()

 

If your new flow design does not work as expected, please do the following:

-Add a dummy 'Compose' action block just after the trigger, assign as its input the multichoice column from dynamic content menu. THen, please reexecute the flow and share the 'Compose' outputs

-Share a screenshot from this new flow design also

 

Thanx!

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



it did not work

 

Flow.png

Hi again!

Why are you assigning 'Current item' dynamic content to 'Create item 'List' input?

With the info you shared so far, it seems the error displayed is due to this assignment.

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



sorry, I have rectified it but still not creating

 

Flow.png

 

 

this is what I want to achieve

 

Flow.png

 

 

this is the error I am getting

 

error.png

 

Hi @mathwari ,

 

Do you need to complete this operation in the same list?

If it is, you can refer to the following method:

131.PNG132.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

thank you for your reply.

 

it creates the same item with same values.

 

as i clarified earlier, it should create a new item for each company

 

 

Following is my test result:

1.PNG

Same title, different company.

 

 

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (47,721)