Good Morning all,
I am new to the world of Microsoft Flows, I am a low grade developer - I have wrote many different apps for making my life easier, and I stumbled across Flows. I am however struggling to adjust to the flows.
I have created a form, it contains 3 static text fields for the likes of Name and Email Address. I then have choice boxes, lets call them product 1 through 10.
My flow is as follows:
When a new response is submitted > get flow response details > Initialise a variable > Create Sharepoint Item.
Now, At the point I initialise the variable, and it allows me to set the value as to all chosen options on the form.
The next step is to create the sharepoint item, which again - half works....
Customer Name, Company Name and Contact Email address - pulls the fields perfectly from the form, along with "all products" - the item creates in sharepoint, without error. So I know flows can talk to sharepoint.
The issue is "products 1 through 10". I have set sharepoint to have products 1 - 10 each with their own column "yes or no" format. When I try to set the flow though it defaults to either "yes" or "no", I can go to "enter custom value" but there is no dynamic content available.
from a coding perspective, I want to achieve the following "if productslist contains product1 then set yes/no field to yes", likewise for the rest of the individual product fields. But if I do an "if", I cannot find the syntax required to say "read the variable" so that I can say "does it contain".
Can anyone assist? am I missing something obvious
It took a bit of fettling and trial and error with adjusting your provided code, but it seems to now be working as expected!
Thank you very much for your help Manuel.
Hi @Anonymous
The formula is incorrect. If you want to compare you need:
Here's the formula
if(equals(body('Get_item')['Title'],'Yes'),true,false)
Here's an example of me using that formula:
The "body('Get_item')['Title']" gets the correct value because:
Regarding the formula:
Does it make sense?
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Cheers
Manuel
Hi Manuel,
So I already have a list of individual items brought together in an "all products list" which is an initialised variable which exports all chosen options to a suitable column in sharepoint. In the same flow, I want it to check each field so per the below.
HI @Anonymous
Yes, but in that case, you want to store the value(s) that were chosen. For example:
If I pick the first two then I want to get "Apples, Oranges" not true or false.
I think your case is more straightforward. If you have a Yes, No column, you need to convert it to store it in SharePoint. If you have a multiple-choice, then you need to store them in a column that supports multiple elements.
Makes sense? These are two different cases.
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Cheers
Manuel
Hi Manuel,
I have just had the opportunity to go back to, and look into my flow further.
Am I right in saying in the below scenario: Forms has a multicheck option
Form 1 : Question 1:
MultiChoice A
MultiChoice B
MultiChoice C
MultiChoice D
IF("Question 1",'MultiChoice A',true',false')
IF("Question 1",'MultiChoice B',true',false')
IF("Question 1",'MultiChoice C',true',false')
IF("Question 1",'MultiChoice A',true',false')
or have I done this wrong altogether?
HI @Anonymous
It's expected. The field is expecting a field type and only shows fields from that type. Since we're converting it, it will not show, so you need to fill it in by hand. You can select just the field, copy and then paste it into the formula. Just be careful to remove the @{ and the } from copied value.
Let me know if that works for you.
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Cheers
Manuel
Hi Manuel,
Apologies I have not had time to look.
It doesnt allow me to choose a field at the moment when I do if, it doesn't autocomplete. I thought this meant the formulae was incorrect?
Thanks
Hi @Anonymous
Were you able to try this method? Did it work?
If it did can you mark it as an answer so that others can find it faster and help them in similar issues?
Thanks
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Cheers
Manuel
Hi @Anonymous
Columns "Yes/No" in SharePoint need to be provided as true or false. Since the Form will provide Yes or No, you need to make a simple formula to fix it.
if(<insert your field here>,'Yes',true,false)
Then SharePoint will fill in the value correctly.
Regarding the variable, contains only works if it's an array. You can define an array variable and check it into a simple condition.
Is this what you need? Sorry if I misunderstood something, but please let me know if something is missing so that I can help you further. Also, if this is not the full answer, please provide screenshots of the Power Automation, offuscating any sensitive data. It helps a lot in looking at what's happening.
Don't worry; we'll figure this out.
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Cheers
Manuel
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492