Hello everybody!
i am new to flow and was wondering if the following scenario is possible with flow:
I have a file in SharePoint, this file will be filled with metering data each month by several users. I want flow to check if the data has been already been entered and if yes, send the data/table as email.
One option would be to check if all the fields have been filled and if yes, send it.
Option two would check if the last field has been filled and then send it.
Could anyone point me in the right direction or similar template?
Hi!
Let's try this expression instead
@equals(empty(coalesce(item()?['Näit'],'')),false)
Hope this helps
The value is: @not(equals(item()?['Näit'], null))
Hi!
understoood, please go to your Filter Array, click on 'edit in advanced mode' and share the expression shown
Thanx!
Hello again.
Thanks for the obvious hint!
No the Condition block that compares the two outputs returns always "true". It seems that the expression "null" is being still counted in the Filter Array output. Screenshot added.
Hi!
In order to add the suggested expression to your Compose action block, you need to do it via 'Dynamic content' menu
https://flow.microsoft.com/es-es/blog/use-expressions-in-actions/
Hope this helps
Thanks for the huge help! 🙂
Somehow the last compare condition comes out false no matter if the Excel file is filled or not. Something is still missing.
Hi!
So in your screenshot you show 3 excel rows. And you need all three rows have value set in column B, right?
If so, I would do the following:
-remove 'Apply to each' and all its internal logic
-Add a compose action block just after the 'List rows present on a table', assign it the following expression
length(body('List_rows_present_in_a_table_2')?['value'])
-Add a Filter Array, assign "List rows present in a table" output as its input. Configure the 'Filter array' evaluation as your it is your current Condition
-Add a second compose action block just after Filter Array, assign it the following expression
length(body('Filter_array'))
Now add a Condition action block, to compare both Compose, operator equals
On the true branch send the email
Not on my laptop, didn't have time to test
Hope this helps
Hello again,
i got started with the flow, but i'm stuck with the condition block. How to set it up so, that an email gets sent only after all fields have been filled?
Hi again!
@Romels wrote:
First of all, thanks for the swift answer.
Is it possible to check if all rows have been filled? Or add a final "input completed row" so if that is filled all is considered complete.
The file doesn't store info from the last month, each month there will be a new file uploaded.
If you know the nr of rows that shall be filled monthly, I guess it is easy to check. I mean, as each month there will be a new file upload and assuming it shall store just rows from current month...
-Add a 'List rows present in a table' action block
-use length() to calculate nr of filled rows
My suggestion is to try implementing it and let us know
Thanx!
First of all, thanks for the swift answer.
Is it possible to check if all rows have been filled? Or add a final "input completed row" so if that is filled all is considered complete.
The file doesn't store info from the last month, each month there will be a new file uploaded.