cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
msmith
Level 8

Conditional text

Using the "Send using email" action, how can I change or make text visible based on data within a list. For example I have 4 yes/no columns and I only want to display everything that equals Yes to be in the body of the email. 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Conditional text

HI @msmith,

 

Could you please share a bit more about your SharePoint list?

Do you want to filter items of SharePoint list based on 4 yes/no columns which are all equal to Yes and then contain them in the body of the email?

Further, could you please show more details about your scenario?

 

I assume that you want to filter items of SharePoint list based on 4 yes/no columns which are all equal to Yes and then contain them in the body of the email, I have made a test on my side and please take a try with the following workaround:

  • Add a proper trigger, here I use Flow button trigger.
  • Add a "Get items" action, specify Site Address and List Name.
  • Add a "Filter array" action, From set to output of "Get items" action, click "Edit in advanced mode", type the following formula:
  • @and(equals(item()?['Column1'], true),equals(item()?['Column2'], true),equals(item()?['Column3'], true),equals(item()?['Column4'], true))
    Add a "Select" action, From set to output of "Filter array" action, within Map entry, type the entry as below:20.JPG

    Within key box, type the column name that you want to show up.Within value box, type the following formula:

item()?['ColumnNameOfYourSharePointList']
  • Add a "Create HTML table" action, From set to output of "Select" action.
  • Add a "Send an email" action, Body field set to output of "Create HTML table" action, Is HTML set to Yes.

 

Image reference:

18.JPG

 

19.JPG

The flow works successfully as below:21.JPG

 

22.JPG

 

 

Best regardS,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 REPLY 1
Community Support Team
Community Support Team

Re: Conditional text

HI @msmith,

 

Could you please share a bit more about your SharePoint list?

Do you want to filter items of SharePoint list based on 4 yes/no columns which are all equal to Yes and then contain them in the body of the email?

Further, could you please show more details about your scenario?

 

I assume that you want to filter items of SharePoint list based on 4 yes/no columns which are all equal to Yes and then contain them in the body of the email, I have made a test on my side and please take a try with the following workaround:

  • Add a proper trigger, here I use Flow button trigger.
  • Add a "Get items" action, specify Site Address and List Name.
  • Add a "Filter array" action, From set to output of "Get items" action, click "Edit in advanced mode", type the following formula:
  • @and(equals(item()?['Column1'], true),equals(item()?['Column2'], true),equals(item()?['Column3'], true),equals(item()?['Column4'], true))
    Add a "Select" action, From set to output of "Filter array" action, within Map entry, type the entry as below:20.JPG

    Within key box, type the column name that you want to show up.Within value box, type the following formula:

item()?['ColumnNameOfYourSharePointList']
  • Add a "Create HTML table" action, From set to output of "Select" action.
  • Add a "Send an email" action, Body field set to output of "Create HTML table" action, Is HTML set to Yes.

 

Image reference:

18.JPG

 

19.JPG

The flow works successfully as below:21.JPG

 

22.JPG

 

 

Best regardS,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 322 members 4,456 guests
Please welcome our newest community members: