cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Do Until SharePoint field populated

Hi, 

I'm struggling with the Do Until action, and hoping someone can give me some guidance. 

 

My goal is to wait until an "Assigned To" field is populated in a SharePoint list, and then send an email. It seems this should be relatively straight-forward, but my flow is not waiting for the field to be populated. I configured the flow to wait until the Assigned to Email contains the "@" character (I've tried a couple other variations, and also on a text field, and none behave as expected). Below is the configuration of the Do Until step: 

 

Do Until Action.PNG

 

Any tips on what I'm doing wrong?

 

Thanks in advance. 

11 REPLIES 11
BridgetZ
Advocate IV
Advocate IV

This is probably no help, but maybe someone with Microsoft will see it. In SharePoint designer, if it was a text field you could set it to "Is not empty". That doesn't seem to be the option in Flow though. Maybe that option can be added?

Capture.PNG

 

I haven't had to use a "do until" field yet so can't be any help, sorry. Will be following because I know I will need this in the future.

Anonymous
Not applicable

I appreciate that suggestion - that's actually what I've already done. However, I'm trying to learn Flow and would like to build as much as I can with Flow rather than Designer. If I figure find a solution outside of this thread I'll be sure to post an update for you. 

Same here! Learning a lot just looking at the questions in the Boards.

Hi @Anonymous,

 

Could you please take a try to switch the Do until condition in Advanced mode, then modify the formula as below?

 

Not(
      Empty(TriggerBody()?['Assigned_x0020_To']?['Email'])
)

Please modify the field ( example:

TriggerBody()?['Assigned_x0020_To']?['Email']

) with the one showing under the Advanced mode of your Do Until condition.

 

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-micsh-msft,

 

Apologies for the delayed response. I tried your solution, but it does not accept the expression as a valid template language expression. Here is my expression:

Not(
Empty(TriggerBody()?['AssignedTo']?['Email'])
)

The specific error is: "The template validation failed: 'The property 'expression' 'Not( Empty(TriggerBody()?['AssignedTo']?['Email']) )' of template action 'Do_until' at line '1' and column '1379' is not a valid template language expression.'."

 

Did I miss something here?

efialtes
Kudo Kingpin
Kudo Kingpin

@Anonymous
AssignedTo or Assigned_x0020_To? Spaces in SP lists column names are usually translated as @v-micsh-msft suggests
Anonymous
Not applicable

@efialtes thanks for taking a look, but AssignedTo is correct. My field does not have a space in the name.

@Anonymous

I've tried a similar approach, the following WDL expression has been accepted by Flow when saving it. Please note I am

evaluating a first level column, so does not exactly match with the scenario you want to implement

DoUntil.png

 

If you manage to save you flow without errors, please note I've executed my example flow by adding a new item to the list, leaving "Decision" column empty, but it seems it is populated inside the trigger as null, so the Do-Until condition is matched the very first time Flow evaluates it (not what I was looking for)

DoUntilExecution.png

If you face the same problem, I guess coalesce function may help (https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-workflow-definition-language) since it helps you to replace Null by whatever convinient string

Hope this helps more than my first answer

I'm also having problems with this... It was much easier with SP Designer and the 'Wait' and 'Is Not Empty' options.  There should really be a more straightforward way in Flow to do this.  I'd rather not build things in SPDesigner anymore as it's clear that MS is moving away from that as a tool.  Can anyone help resolve this?

 

edit to include a screenshot of my flow.  I think we're trying to do a similar thing here.  Thoughts?

 

Screen Shot 2017-07-22 at 10.59.14 AM.png

Does anyone already have a simple solution for this?

My issue was similar in that I was waiting for a specific requirement to be met before I then continued the Flow. 

 

If you click Change Limits in your Do until, you will see 2 options: Count and Timeout. I set Count to 5000 and Timeout to P30D (30 days as per https://en.wikipedia.org/wiki/ISO_8601) .

 

I also used null in the expression, rather than "" or other text. See image belownull.JPG

 

 

 

 

 

 

 

 

On an unrelated tangent, I then used 2 variables to set a "Delay until" action at 5 minute intervals - a "DelayUntil" and "DelayUntilPrev". The initial value for "DelayUntil" was set at 5 minutes from NOW and "DelayUntilPrev" is set to be the same as "DelayUntil".

 

For each 'loop' through Do Until, I set "DelayUntil" to be "DelayUntilPrev" + 5 minutes. "DelayUntilPrev" is then set to the new "DelayUntil" value.

 

The formula for "DelayUntil" in the loop is below:

if(
  greater(
    utcNow()addHours(startOfDay(utcNow())17)
              ),
  addDays(
    addHours(startOfDay(utcNow())8),
    1
                ),
  addMinutes(variables('DelayUntilPrev')5)
)
 
The if rule checks if the current time is after 1700 UTC. If so, it then sets "DelayUntil" to 0800 UTC of the next day. Otherwise, it sets "DelayUntil" to 5 minutes later. This avoids using up "Counts" when a possible return value would only be expected during standard business hours. You may need to adjust this for your timezone, working hours etc.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,793)