Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Cant use a Sharepoint online field to be used MS Flows IF or SWITCH statement

(0) ShareShare
ReportReport
Posted on by 9

 

So, I´ve been struggling with this particular issue, and just for the record i am just starting with Flows I really love it but this time i am starting to hate it

 

I have a flow that will create an HTML table and send out an email with this HTML table once certain condition matchs with a value from a Sharepoint Online list

 

I have created a number "status" column called ACTIVITYSTATUS from a PowerApp i am able to patch whatever value I want into this column.

 

From flows I have added a condition that will evaluate ACTIVITYSTATUS and depending on its current value will be sending out the email with the table.  Dont know what else i can do tomake flows take the real value of the column to evaluate it. I have even tried with integers changing the column to number but it is still the same, any advice on this

 

 

FLow.PNG

 
  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at
    Re: Cant use a Sharepoint online field to be used MS Flows IF or SWITCH statement

    Hi @RicardoC 

     

    You should trigger your flow -"when an item is modified" to make sure it runs only when a item is modified and then you can send email.

     

    -----------------------------------------------------------------------------------------
    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
  • RicardoC Profile Picture
    9 on at
    Re: Cant use a Sharepoint online field to be used MS Flows IF or SWITCH statement

    @DeepakS  You were right, now I see that the flow is pulling the row with the B status, but how to make the flow to pull just the one modified instead of the whole array.

  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at
    Re: Cant use a Sharepoint online field to be used MS Flows IF or SWITCH statement

    Hi @RicardoC 

    I created a sample flow to explain your issue:

    here is my SP list with Activity Status column, with three items and each has different status:

    SPList1.png

     

    Here is my flow very similar to yours:

    Flow1.png

    Now few points to notice:

    -This will is working with no issue, but yes i am looping through each item in list (i have three) i will get true condition only once as only one item has Activity Status ="Done" .

    now if i look at your Html it has many empty row (as you can also see you have 19 items loop) so your condition is might not be matching for empty records, 

    this is how your html table looks:

    html.png 

    As you see first two records are empty, so lets click on the next on "Apply to each" action until you reach the item 3 , you should have true condition there.

     

    Let me know if that make sense?

     

    -------------------------------------------------------------------------------------------------------------------------------------------

    If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

  • RicardoC Profile Picture
    9 on at
    Re: Cant use a Sharepoint online field to be used MS Flows IF or SWITCH statement

    @Jcook 

    This is the output from the compose that contains the HTML table

     

    <table><thead><tr><th>act</th><th>status</th><th>ActivitySTATUS</th><th>act2</th></tr></thead><tbody><tr><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>test input</td><td>1</td><td>b</td><td>AQUI ESTA EL Ccambio</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>Ingreso 50000</td><td>1</td><td></td><td>Ingreso 2</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>Office365</td><td></td><td></td><td>Intranet</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>PowerBI</td><td></td><td></td><td>Mas BI</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr></tbody></table>

     

    and this is the view of the table when it comes to my email when I set the output in the FALSE condition 

     

    activitystatus.PNG

     

    and this is the view of the getItems

     

    FLows3.PNG

  • Jcook Profile Picture
    7,770 Most Valuable Professional on at
    Re: Cant use a Sharepoint online field to be used MS Flows IF or SWITCH statement
    Hi

    So the first Compose has ACTIVITYSTATUS?

    Can you please share or check the output of the Get items action. What value is being grabbed from that field for Activity Status?

    In the HTML table output I cannot see the whole output from your picture. It cuts off right at the ActivityStatus part.

    But my guess is that ACTIVITYSTATUS is not the value you think it is.

    —Josh
    If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
  • RicardoC Profile Picture
    9 on at
    Re: Cant use a Sharepoint online field to be used MS Flows IF or SWITCH statement

    @Jcook  after adding two compose those are the outputs, on the first one it gives me a download link and it takes me to nothing the second takes me to the HTML table and it was created the way it supposed to be. Any ideas?

     

     

    compose.PNG

  • RicardoC Profile Picture
    9 on at
    Re: Cant use a Sharepoint online field to be used MS Flows IF or SWITCH statement

    @DeepakS this is how I setup my flow, the table, the Activitystatus column in the condition was setup as single line of text on the Sharepoint Online List, I´ve already tried with number type but none of them seems to work

     

    flow2.PNG

     

     

  • Jcook Profile Picture
    7,770 Most Valuable Professional on at
    Re: Cant use a Sharepoint online field to be used MS Flows IF or SWITCH statement
    Hello @RicardoC

    To help troubleshoot this, please add 2 Compose actions before the IF condition.

    Put the value from SharePoint you are checking in one compose
    And put the value from the HTML table in the other compose.

    The value are most likely different. Maybe because of the formatting from the HTML table.

    Please try that above and let me know what the values in the compose actions are when you run the flow again.

    As well as the IF condition.

    —Josh
    If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at
    Re: Cant use a Sharepoint online field to be used MS Flows IF or SWITCH statement

    Hi @RicardoC 

     

    Could you please share your condition expression ,so i can check if that need any correction.

     

    Regards,

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,522 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,890 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow