I have a Microsoft Form which has a multiple choice question (multiple answers allowed), in this example:
In my SharePoint List, I have a column which is formatted as a choice with the exact same choices. In both the Form and the List multiple-answers is allowed.
I have a Flow which is grabbing the Form fill data and creating an item in the SharePoint list. The problem is the way it gets displayed in the list. If someone checks off both Morning and Afternoon in the form for example, what appears in the list is:
I tried formatting the column as text instead of choice, but I get the same result.
If I manually enter an item in the list and check off those two what appears is:
Is there anyway to work the Flow so that the result is clean like that?
Thanks in advance.
Great article here explaining the exact same scenario you have:
Please read it carefully, since it starts explaining how SP multichoice works from Flow perspective, then introduces how Forms multichoice works from Flow perspective
Hope this helps
Thank you for that. I'm having a super hard time getting it to work though, probably because I dont fully understand the mechanics of it.
It think I have it right, but its giving me an error:
ExpressionEvaluationFailed. The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@outputs('Get_response_details')?['body/re275778528fd421da8e51ae202340ef2']' is of type 'String'. The result must be a valid array.
Here is what I have:
When on Monday is the question on the Form which is multiple choice (morning, afternoon, evening).
Please put your expression in Dynamic expression text like this-(my expression is random one, not related to your problem)
I think my problem is the first item in the Apply to each ("Select an output from previous steps"). In the example, it shows "List of Response...". Thats not a dynamic content piece I've ever seen (and on the face of it, wouldn't the Get Response Details have to come first in order to get a list of responses anyway?!?).
What I've been putting in there instead is the multiple choice question from the form, and the error is telling me that is not an array.
Now share your action details " format output......6" with screen. So that i get to know that what are you passing in loop?
As error clearly said expression is string it must be of collection type like array.
Yes, going by to code referenced by the error (@outputs('Get_response_details')?['body/re275778528fd421da8e51ae202340ef2']), it seems to be referring to the When on Monday dynamic content I am putting at the start. I just dont know what else I could or should be using there.
In your MS Form, what is type of question "when on monday" means- single text, choices etc. One suggestion, use compose just above the loop and supply same input "when on monday" and share compose output. In this way we will get to know what kind of value in "what on monday" is coming.
The question on the Form is multiple choice (multiple answers allowed):
If I put a Compose right before the operation, and put that question in, here is the result from a test run where a person selected Morning and Afternoon as their answer:
Now put apply to each action and supply output of this compose in value because it is in array. Inside apply to each use append to string variable and pass current value with comma and space as value so that each value append as you want. Before doing append to string pls initialize a variable of type string.
If you face any difficulty i will post screen tomorrow.
I'm still lost. By all accounts the Apply to Each is getting an Array at the start, but the error I keep getting is that it is not an Array...
please follow steps- expression in compose-
If you use append to array variable then your output will have brackets and double quotes which you can manipulate later via converting it into string . So no need of using append to array here.