cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Start flow only when all the required columns are filled

Hi there,

 

I just have a small question/issue with flow.

We have a SharePoint library with a couple of required columns.

Flow starts immediately when a document is uploaded. However not all the fields are filled in yet by the user. 

 

Is it possible to start a flow once all the required fields are filled?

Now we have a situation, that the flow starts before the required fields are filled in. 

Any ideas how we could solve this?

 

 

flow.png 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Start flow only when all the required columns are filled

Hi @Masoud,

 

How many required fields existed in your SharePoint library?

 

I assume that there are three required fields existed in your SharePoint library. In addition, I don’t think your flow could achieve your needs, I have made a test on my side and please take a try with the following workaround:

  • Add a “When a file is created or modified (properties only)” trigger.
  • Add a Condition, click “Edit in advanced mode”, type the following formula:
@and(and(not(empty(triggerBody()?['Company'])),not(empty(triggerBody()?['Amound']))),not(empty(triggerBody()?['Week'])))
  • Within “If/yes” branch of Condition, add a “Create item” action.

Image reference:2.JPG

The flow works successfully as below:3.JPG

 

Besides, you could consider take a try with a nested condition to achieve your needs. The flow’s configuration as below:4.JPG

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Start flow only when all the required columns are filled

Hi @Masoud,

 

How many required fields existed in your SharePoint library?

 

I assume that there are three required fields existed in your SharePoint library. In addition, I don’t think your flow could achieve your needs, I have made a test on my side and please take a try with the following workaround:

  • Add a “When a file is created or modified (properties only)” trigger.
  • Add a Condition, click “Edit in advanced mode”, type the following formula:
@and(and(not(empty(triggerBody()?['Company'])),not(empty(triggerBody()?['Amound']))),not(empty(triggerBody()?['Week'])))
  • Within “If/yes” branch of Condition, add a “Create item” action.

Image reference:2.JPG

The flow works successfully as below:3.JPG

 

Besides, you could consider take a try with a nested condition to achieve your needs. The flow’s configuration as below:4.JPG

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Frequent Visitor

Re: Start flow only when all the required columns are filled

Hi @v-xida-msft,

 

First of all thank you for your fast reply.

 

We have 3 required fields in our SharePoint Library.

I have tried your suggested workaround.

 

I noticed 2 things:

1. After each update in sharepoint library, a flow is triggered. In our case this flow will run 3 times before the actual workflow could be started. is that not a "waste" of resources, especially if we count that each user could use 2000 flows per month according price list. 

 

2. Fields amount and date are number fields and not strings. This gives us the following error: "Unable to process template language expressions for action 'Condition' at line '1' and column '2175': 'The template language function 'empty' expects its parameter to be an object, an array or a string. The provided value is of type 'Float'. Please see https://aka.ms/logicexpressions#empty for usage details.'."

 

 

 

flow2.pngflow3.png

Highlighted
Frequent Visitor

Re: Start flow only when all the required columns are filled

I was able to solve the error by converting float to string.

This formula below works in our situation:

 

 

@and(and(not(empty(triggerBody()?['Company'])),not(empty(string(triggerBody()?['Amount'])))),not(empty(string(triggerBody()?['Week']))))

 

 

The only thing that is still not working is that the flow will start everytime we edit a document. 

This causes that we will hit the maximum flows per user faster than we expected. 

Highlighted
Helper V
Helper V

Re: Start flow only when all the required columns are filled

please un-accept this answer as solution and remove the reply. advanced mode is no longer available in flow conditions

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (8,687)