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

Multiple Choice Microsoft Forms object to Multiple Choice SharePoint list entry

.

1 ACCEPTED SOLUTION

Accepted Solutions
Rhiassuring
Community Champion
Community Champion

Okay, here we go: 

 

Rhiassuring_0-1650476216790.png


Step 1 - Trigger on "When a new response is submitted", and follow-up with a "Get response details"
Step 2 - Initialize a variable for each of your Multi-Choice columns. In my example, I only have "Ducks", so I have created an Array called "arrDucks". Note that I have added [] as the initialized value.

Step 3 - Use a "Compose" action to split the response from your form. The format looks like this, and will point at your Multi-Choice Field from your form input. 

split(replace(replace(replace(YOURFORMMULTICHOICEHERE,'","','|'), '["',''), '"]',''),'|')

 

Step 4 - Create an "Apply to Each" and drop the "Outputs" from your Compose action into it. Then, add an "Append to array variable" action - in here, point it at your "arrDucks" array, and in the value, type {"Value":""} - then, click between the last 2 quotations, and add "Current Item" from your Dynamic Content (it is going to be at the verrrrrry bottom of the list.) 

 

Step 5 - Use the "Create Item" SharePoint action. When you are populating your multi-choice column, ensure you are in the "Enter as Array" format, as below. 

Rhiassuring_1-1650476572814.png
Rhiassuring_2-1650476603556.png

 

Add your "arrDucks" into the field. 

Rhiassuring_3-1650476641929.png

 

 

One thing of note: I've set my multi-choice column in SharePoint to "allow fill-in options" -- that way SharePoint will automatically add the value as a filterable option. 

 

Rhiassuring_4-1650476690691.png

 

 

("Fancy" was the one that didn't exist in the list before and was input by the user in the form.)

 

Cheers,

 

Rhia

View solution in original post

7 REPLIES 7
Rhiassuring
Community Champion
Community Champion

Well, for the Multiple Choice, yes we can get that filterable in your list. 

For Custom Inputs - well, that can't be filtered if it's complete free text. I mean, we could add each response as an option in a dropdown in a column, but that seems a bit silly to me. 

Before we start, I want to make sure I understand your data. Can you give an example? Is it like this:

1. What kind of ducks do you like?
[] Mallard

[] Muscovy

[] Domestic

[] Other (Please Input) [ __________ ]

Or do you also have questions that are like


2. Please tell us about a time you saw a nice duck. 

[_________ free text input ___________]

 

Because for #2, that'd be pretty ..strange to get filterable, unless you were looking for keywords. 

For #1, should be a bit easier.

Kuchen
Frequent Visitor

.

Rhiassuring
Community Champion
Community Champion

Sure - and so a response might be:

1. What kind of ducks do you like?
[] Mallard

[] Muscovy

[] Domestic

[] Other (Please Input) [ _____Fancy_____ ]

Then in your SharePoint multi-select column, you want "Fancy" to be added as a choice to the already existing multi-choice list. 

I can put this together (I think) - check back soon!

.

Rhiassuring
Community Champion
Community Champion

Okay, here we go: 

 

Rhiassuring_0-1650476216790.png


Step 1 - Trigger on "When a new response is submitted", and follow-up with a "Get response details"
Step 2 - Initialize a variable for each of your Multi-Choice columns. In my example, I only have "Ducks", so I have created an Array called "arrDucks". Note that I have added [] as the initialized value.

Step 3 - Use a "Compose" action to split the response from your form. The format looks like this, and will point at your Multi-Choice Field from your form input. 

split(replace(replace(replace(YOURFORMMULTICHOICEHERE,'","','|'), '["',''), '"]',''),'|')

 

Step 4 - Create an "Apply to Each" and drop the "Outputs" from your Compose action into it. Then, add an "Append to array variable" action - in here, point it at your "arrDucks" array, and in the value, type {"Value":""} - then, click between the last 2 quotations, and add "Current Item" from your Dynamic Content (it is going to be at the verrrrrry bottom of the list.) 

 

Step 5 - Use the "Create Item" SharePoint action. When you are populating your multi-choice column, ensure you are in the "Enter as Array" format, as below. 

Rhiassuring_1-1650476572814.png
Rhiassuring_2-1650476603556.png

 

Add your "arrDucks" into the field. 

Rhiassuring_3-1650476641929.png

 

 

One thing of note: I've set my multi-choice column in SharePoint to "allow fill-in options" -- that way SharePoint will automatically add the value as a filterable option. 

 

Rhiassuring_4-1650476690691.png

 

 

("Fancy" was the one that didn't exist in the list before and was input by the user in the form.)

 

Cheers,

 

Rhia

.

Rhiassuring
Community Champion
Community Champion

I was there in February 2020! Will let you know if I show up again though 😉 

Cheers!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,802)