cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
erowa
Regular Visitor

Do Until Function with Yes/No-condition

Hello together

I am creating a flow in which a Do Until function is repeated until a field in Sharepoint is changed from No to Yes. During this time a notification email will be sent to the responsible user until he also changes the above mentioned field from No to Yes. I have tried various methods, but the flow does not recognize that the sharepoint field has been changed to Yes and therefore remains stuck in the do-until loop forever.

2020-10-30 08_02_33-Window.png

 

Thanks for your help

6 REPLIES 6
pre
Community Support
Community Support

Hello @erowa 

Share the full flow design so that I can repro the issue and help you further .

 

For example if the basic view to generate the advanced function is as below, will not work ::

@equals(triggerBody()?['SupervisorApproved'], 'true')

And the problem with this is that it checks for a string 'true', instead of a boolean value for true. Changing the function to removing the quotes should help::

@equals(triggerBody()?['SupervisorApproved'], true)

The above should check for actual boolean true instead of a string 'true'.

Thanks

erowa
Regular Visitor

Hello and thank you for your response

 

It does say: 

@equals(outputs('Element_erstellen')?['body/Qualit_x00e4_tskontrolle'], true)

Here is my flow, unfortunately it is in german:

erowa_0-1604397360119.png

Regards

 

pre
Community Support
Community Support

Hello @erowa 

In the screenshot can see that you are trying to set the true as Expression value. Try as below and check ::Keep the string value within quotes::

@equals(outputs('Element_erstellen')?['body/Qualit_x00e4_tskontrolle'], 'true')

 

Paulie78
Super User III
Super User III

The way you are trying to do it isn't going to work. Because it is not doing another lookup every iteration of the loop, it is using the same data that it began with when the flow executed. If you want to check if the field has been updated, you will need to look up the value of the item again within the loop. 

 

You will have to base your do..until loop on a variable that you set within the loop when the value in your SharePoint is updated.

erowa
Regular Visitor

Hello Paulie
I apologize for the late reply, but I want to thank you for your help.

What do you mean with:


@Paulie78 wrote:

You will have to base your do..until loop on a variable that you set within the loop when the value in your SharePoint is updated.



I have a message saying that an action to initialize a variable can only take place at the top level. Could you perhaps show me an example?

Jonas

ethemgok
Frequent Visitor

When I do it like this, it doesn't work. Is there a different solution?

 

ethemgok_0-1618210414626.png

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,021)