cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

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
Community Support

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.

View solution in original post

1 REPLY 1
Community Support
Community Support

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.

View solution in original post

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (9,459)