Hello All!!
I am creating a flow that will run daily and traverse through a list looking for items with an upcoming expire date (within the next 30 days). I am then using the create HTML table to add the query items into a single email. I have two emails to send if certain conditions are met. The first sends an email when there are items creating the table and the other email is to run when there are no items up for expiration. I am at a loss on how to do this correctly. This is all too new to me.
Please know I definitely appreciate the help!!!!!!!!!!!!
Thanks in advance,
D
Solved! Go to Solution.
Hello @CobraKaiForever
Could you share a screenshot of your flow if my solution does not solve your problem.
You can use the expression length() to check the length of your data. In your flow are you putting the data anywhere before you pass it to the HTML table action?
For example, I have a variable with all my data before I pass to HTML table:
Now I can have a condition check the length of my variable:
My expression is:
length(variables('data'))
Now you can have two separate send email actions, in the If yes, and If no
If you can only have the HTML table to check than you will have to add a 'Compose' action and use the expression length() on the HTML table.
** Note: The HTML table action still has a length when empty, so we must get the length of it when its empty to put inside our condition **
For example:
My expression is:
length(body('Create_HTML_table'))
When I run the Flow when the HTML table is empty, I get a length of 30
So now I can build my condition to check if the HTML table length is greater than 30
Expression:
length(body('Create_HTML_table'))
Empty HTML table = false:
HTML table NOT empty = true:
Proud to be a Flownaut!
Hello @CobraKaiForever
Could you share a screenshot of your flow if my solution does not solve your problem.
You can use the expression length() to check the length of your data. In your flow are you putting the data anywhere before you pass it to the HTML table action?
For example, I have a variable with all my data before I pass to HTML table:
Now I can have a condition check the length of my variable:
My expression is:
length(variables('data'))
Now you can have two separate send email actions, in the If yes, and If no
If you can only have the HTML table to check than you will have to add a 'Compose' action and use the expression length() on the HTML table.
** Note: The HTML table action still has a length when empty, so we must get the length of it when its empty to put inside our condition **
For example:
My expression is:
length(body('Create_HTML_table'))
When I run the Flow when the HTML table is empty, I get a length of 30
So now I can build my condition to check if the HTML table length is greater than 30
Expression:
length(body('Create_HTML_table'))
Empty HTML table = false:
HTML table NOT empty = true:
Proud to be a Flownaut!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
31 | |
27 | |
27 | |
21 | |
10 |