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

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
Community Support Team
Community Support Team

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

3 REPLIES 3
Community Support Team
Community Support Team

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

Masoud
Level: Powered On

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

Masoud
Level: Powered On

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. 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

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 Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,003)