Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Dynamic Content - available for some fields but not all

(0) ShareShare
ReportReport
Posted on by

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

  • Community Power Platform Member Profile Picture
    on at
    Re: Dynamic Content - available for some fields but not all

    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.

  • Verified answer
    manuelstgomes Profile Picture
    6,625 on at
    Re: Dynamic Content - available for some fields but not all

    Hi @Anonymous 

     

    The formula is incorrect. If you want to compare you need:

    1. To reference the field that you want to compare.
    2. To use the functions to compare and if

     

    Here's the formula

    if(equals(body('Get_item')['Title'],'Yes'),true,false)

     

    Here's an example of me using that formula:

    2019-12-17 13_52_34-Window.png

     

    The "body('Get_item')['Title']" gets the correct value because:

    1. "Get_item" is the name of the action where I fetch the field
    2. "Title" is the field I need

     

    Regarding the formula:

    1. Use equals(field1,field2) to compare 2 fields
    2. Use If(expression,valueIfTrue,valueIfFalse) to get the correct values

     

    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

  • Community Power Platform Member Profile Picture
    on at
    Re: Dynamic Content - available for some fields but not all

    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.

     

    if(AllProductsList.contains"option1","Yes","No") is an invalid expression. Likewise for 
    if(AllProductsList("S300"),"Yes","No").
     
    The intention is essentially as follows:
     
    Someone fills in form Microsoft Form X. The selected options are then reviewed and its converted into a GUID, which is emailed to Zendesk. Zendesk then picks up those unique GUID's and recognises the GUID's to send on certain emails dependant on the GUID.
     
    It was suggested the best way to do this was to log it in sharepoint first, then for each of the fields if its set to Yes, add it to a variable and then at the end of it, take that GUID list and email it off.
     
    In a vb.net code manner, I would generate the list of 30 items, and say "for each item in the 30 item array, if it contains X then do ABC".
     
    I know I can just go to the "Add Action" then choose "If" and I can carry it down an if X then True > and False >. But I was hoping for a flow that wasn't going to be 3 miles long, so I was hoping to do it on a "If List contains Item 1 then set to yes" as "no" is otherwise defaulted.
  • manuelstgomes Profile Picture
    6,625 on at
    Re: Dynamic Content - available for some fields but not all

    HI @Anonymous 

     

    Yes, but in that case, you want to store the value(s) that were chosen. For example:

    1. Apples
    2. Oranges
    3. Bananas

     

    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

  • Community Power Platform Member Profile Picture
    on at
    Re: Dynamic Content - available for some fields but not all

    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?

     
  • manuelstgomes Profile Picture
    6,625 on at
    Re: Dynamic Content - available for some fields but not all

    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

  • Community Power Platform Member Profile Picture
    on at
    Re: Dynamic Content - available for some fields but not all

    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

  • manuelstgomes Profile Picture
    6,625 on at
    Re: Dynamic Content - available for some fields but not all

    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

  • manuelstgomes Profile Picture
    6,625 on at
    Re: Dynamic Content - available for some fields but not all

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492