I have what I feel is a pretty simply flow using a DoUntil that just doesn't want to trigger. I just want it to wait until a single line text column contain data and then send an email.
After an approval has been made, it sends an email and updates the item status column. No problem there. Then i just want it to wait until the column "Employee Name" gets modified before sending a different email. So i use the @not(Empty(TriggerBody()?['Employee_x0020_Name'])) to wait for the column to not be empty before sending an email. Well, it never notices that the column has data in it. I've waited 20 minutes and my delay6 is only 1 min.
I have tried geting the ID of the Update item 8 as well as the when an item is created. Any ideas or is DoUntil still in Beta?
see my flow here
UPDATE 3/27: So to give this a temp solution, i simply put a default character in the Employee Name column that we will just need to remember to remove when populating that field with a real name. Now my DoUntil is just looking at that column and checking to see if 'does not contain' that character (I used a percent sign % because that's not going to be part of a person's name) and then when it does get populated it will run just fine and send me my darn email! haha
see flow here
I don't think Do Until is in Beta but it might be easier to help if you post some images of your flow (although I cannot do that in this forum). Or a bit more detail about your flow structure.
Perhaps check the output of the 'Get file properties' action (or whatever action/s you are using) because I've found recently that this action does not output custom columns that are emtpy unless they are person/group columns. I have an open question on this forum (and the techcommunity forum) about it. My workaround is to ensure that all columns have a default value. Only then are the custom columns returned in the output. Which then enables me to use the columns in flow conditions. I don't know yet if this is expected behaviour or a bug.
Hope that helps.
I'm no expert but I think your Do Until is looking at the wrong output. TriggerBody will never change as this represents the column when the fow was triggered. And not the column that has been changed since the flow was triggered. Instead the Do Until should be looking at the column output by the 'Get item 6' action.
Perhaps try something like this in the Do Until condition:
@not(empty(body('Get item 6')['Employee_x0020_Name']))
Just an additional note that the code in my previous post will probably generate an InvalidTemplate error unless the 'Employee_x0020_Name' column is populated.
I've just discovered that I have to use the coalesce function in my Do Until condition to avoid the problem with columns that are not populated when the flow is triggered. For example:
@and(not(empty(body('Get_file_properties')?['Approver'])),not(equals(coalesce(body('Get_file_properties')?['InvoiceAmountExclGST'], '0'), '0')),not(equals(coalesce(body('Get_file_properties')?['InvoiceDate'], '19000101'), '19000101')),not(equals(coalesce(body('Get_file_properties')?['InvoiceFrom'], 'Nobody'), 'Nobody')),not(equals(coalesce(body('Get_file_properties')?['InvoiceNumber'], '0'), '0')
Thanks for your reply! , Just get this now: The template validation failed: 'The action(s) 'Get item 6' referenced by 'inputs' in action 'Do_until' are not defined in the template.'
Simply put, i just want to send an email when a text field gets populated. LOL! I am laughing because this tool is sooo powerful but yet seemingly so difficult to figure out something so seemingly easy.
Not sure if your update on original post came before or after your reply to my post but I thought I'd post this anyhow in case its useful.
Here is a pic of my working do until flow with blank/empty columns:
And as before this is the condition in the Do Until:
@and(not(empty(body('Get_file_properties')?['Approver'])),not(equals(coalesce(body('Get_file_properties')?['InvoiceAmountExclGST'], '0'), '0')),not(equals(coalesce(body('Get_file_properties')?['InvoiceDate'], '19000101'), '19000101')),not(equals(coalesce(body('Get_file_properties')?['InvoiceFrom'], 'Nobody'), 'Nobody')),not(equals(coalesce(body('Get_file_properties')?['InvoiceNumber'], '0'), '0')))
And I'm no longer assigning default values to the columns because of the coalesce function. Although I'm working with a library and not a list (as you appear to be), I would have thought the logic essentially the same.
In terms of your flow, I'm not sure why the delay step is necessary except to reduce processing I suppose. Without the delay step, the loop will just keep getting the properties until the column/s get populated.
To help further it would be useful to see a pic of your full flow with each step expanded.
Partly for my own satisfaction, I thought I'd do the following. If it helps thats great. Otherwise, I think I've exhausted my limited knowledge.
I created a list and added a single line text column called 'Employee Name':
The 'Employee Name' column is not required and does not have a default value. I then created the following flow:
I added a new item but didn't populate the 'Employee Name' column. Then watched the flow running for a couple of minutes:
Before editing the item and entering a name in the 'Employee Name' column. Which caused the flow to complete:
And send me a notification:
And a few things I meant to add:
1. The ID used in the 'Get Item' step is the ID of the trigger item.
2. Ensure that the Do Until Count limit is empty/blank
3. I seem to recall from reading/webinar that it is important to add the 'Get item' step before defining the Do Until condition because the condition is dependant on the output of the 'Get item' step. But I could be wrong here.
In addition, you will see that Do Until step looped 284 times before i populated the Employee Name field. If I look through the 'Get item' output for each loop, the 'Employee Name' column is NOT in the output until loop number 284. Which is why it is necessary to either:
1. Assign default values to the column/s OR
2. Use the coalesce function in the condition/s if there are empty fields
The exception to this appears to be person/group columns where they appear in the output even when they are empty.
I also wondered why you are using a text column for the employee name instead of a person/group column but I'm sure you have a good reason for this.
I hope this has helped.
Hi @ jcollins,
You should use the "Employee Name"dynamic content of "Get item" action instead of the "Employee Name" dynamic content of the trigger in the expression of "Do until".
I have made a test on my side, the screenshot of my flow as below:
The expression in the Do until as below:
The flow would run successfully as below:
not(empty ... works for me too in my test list and flow. Just tried it. Which suggests that I don't need to use coalesce when working with a list.
But not(empty doesn't work when I use it with a library (unless the column is a person/group type). I'd like someone to try and explain that to me sometime but probably one of those things I just have to remember ...
Features releasing from October 2020 through March 2021
We are excited to announce the launch of Power Virtual Agents Community. Check it out now!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!