cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jdormer
Level: Powered On

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
Level: Powered On

Re: Do Until SharePoint field populated

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.

jdormer
Level: Powered On

Re: Do Until SharePoint field populated

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. 

BridgetZ
Level: Powered On

Re: Do Until SharePoint field populated

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

Community Support Team
Community Support Team

Re: Do Until SharePoint field populated

Hi @jdormer,

 

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.
jdormer
Level: Powered On

Re: Do Until SharePoint field populated

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
Level 8

Re: Do Until SharePoint field populated

@jdormer
AssignedTo or Assigned_x0020_To? Spaces in SP lists column names are usually translated as @v-micsh-msft suggests
jdormer
Level: Powered On

Re: Do Until SharePoint field populated

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

efialtes
Level 8

Re: Do Until SharePoint field populated

@jdormer

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

PSUlion01
Level: Powered On

Re: Do Until SharePoint field populated

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

Bestebreurtje
Level: Powered On

Re: Do Until SharePoint field populated

Does anyone already have a simple solution for this?

Deck
Level: Powered On

Re: Do Until SharePoint field populated

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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 116 members 4,360 guests
Please welcome our newest community members: