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

Wait until a field is populated

Hi Everyone,

 

I´m struggling to find a way for waiting for a field to be populated, the idea is that when someone uploads a file in sharepoint must wait for 3 specific field be filled and then after those fields are filled the flow goes to the next step wich is send the approval email, here is the printscreen below:

 

Thanks,flow.PNGflow_.PNG

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support
Community Support

Re: Wait until a field is populated

Hi @Espuma ,

 

If you want to start an approval action until certain fields are filled with value, please check the following configuration for a reference.

 

Add the trigger When a file is created (properties only).

 

Initialize two String variables, Test1 and Test2.

 

Add Do-until loop, inside the do until loop, add action Delay (1 minute), then get file properties.

 

Add two set variable actions, set their value with dynamic content Completed and DueDate separately from action Get file properties.

 

Last, click Edit in advanced mode and input the following code in Do-until condition:

@and(not(equals(variables('Test1'), '')),not(equals(variables('Test2'), '')))

Note: when using do until loop, we need to select dynamic content from the actions within the loop. This is one important point to take care of.

 

Under the do-until loop, add action Start and wait for an approval, and other needed actions.

 

Then the flow won’t move on to the following actions until the fields contain value.

1.PNG2.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
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

Super User
Super User

Re: Wait until a field is populated

Hi @Espuma , this way that @v-yamao-msft  shows works too, and with only flow!

 

One point of attention is with 'do until' timeout, the max value you can use is 5000 runs or 30 days, if you put in your delay 1minute the timeout will be reached in 3 days

 

I did for you an example with max timeout in do until and the steps that @v-yamao-msft show, I put here in attachaments, you just need import it.

 

 

 


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


View solution in original post

8 REPLIES 8
Super User
Super User

Re: Wait until a field is populated

Olá Espuma! Feliz em ver brasileiros aqui!!!

 

PT:BR - O meio mais fácil é colocar um fluxo com o gatilho abaixo, neste fluxo você vai verificar se os três campos foram preenchidos, caso forem você faz sua ação, caso contrário não faz nada. Eu recomendo tambem que você crie uma coluna para indicar que você fez a ação para que quando o arquivo for alterado não realize novamente

 

EN - The easiest way is create a flow with the trigger below, in this you'll check if the fields have been filled, in case you do your action, otherwise it does nothing. I also recommend that you create a column to indicate that you did the action so that when the file is changed do not redo

 

Flow 1.jpg

 

Grande Abraço!

 

If my answer was helpful give me a kudo, if I answered question do not forget to mark as an answer to help the community


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


Espuma
Frequent Visitor

Re: Wait until a field is populated

Can you specify the creation of the column? with that modification i receive 2 approvals emails, one for the upload of the file and the second for the modification of the file.

Super User
Super User

Re: Wait until a field is populated

PT-BR: Se eu entendi seu cenário, você só vai mandar a aprovação caso os 3 campos sejam preenchidos, correto?

Se sim, não precisa da trigger de quando um arquivo é carregado, apenas a que mostrei na outra resposta, neste fluxo você vai fazer a condição antes de enviar a aprovação, caso a condição seja satisfeita você manda a aprovação e com base no resultado dela você vai enviar o email.

O que falei de criar a coluna é para não acontecer de modificar o documento e ele enviar a aprovação novamente, neste caso você criaria uma coluna na biblioteca como por exemplo 'EnviadoAprovacao', ai no seu fluxo logo após verificar se as colunas foram preenchidas voce verificaria se já não foi enviado para aprovação, caso não tenha sido envia para aprovação e altera o valor dessa coluna para 'true', caso contrário não faz nada. 

 

EN: 

If I understand your scenario, you will only send approval if all 3 fields are completed, correct?

If yes, do not need the trigger when a file is loaded, just the one I showed in the other answer, in this flow you will make the condition before sending the approval, in case the condition is satisfied you send the approval and based on the result of it You will send the email.

What I said about creating the column is not to modify the document and it sends the approval again, in this case you would create a column in the library like for example 'SentAprovacao', there in your flow soon after verifying that the columns were filled you would check if it was not already submitted for approval, if it was not submitted for approval, and change the value of that column to 'true', otherwise it does nothing.

 

In this logic its flow must have the structure similar to below, but with the correct fields:
Flow 1.jpg

 


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


Community Support
Community Support

Re: Wait until a field is populated

Hi @Espuma ,

 

If you want to start an approval action until certain fields are filled with value, please check the following configuration for a reference.

 

Add the trigger When a file is created (properties only).

 

Initialize two String variables, Test1 and Test2.

 

Add Do-until loop, inside the do until loop, add action Delay (1 minute), then get file properties.

 

Add two set variable actions, set their value with dynamic content Completed and DueDate separately from action Get file properties.

 

Last, click Edit in advanced mode and input the following code in Do-until condition:

@and(not(equals(variables('Test1'), '')),not(equals(variables('Test2'), '')))

Note: when using do until loop, we need to select dynamic content from the actions within the loop. This is one important point to take care of.

 

Under the do-until loop, add action Start and wait for an approval, and other needed actions.

 

Then the flow won’t move on to the following actions until the fields contain value.

1.PNG2.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
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

Super User
Super User

Re: Wait until a field is populated

Hi @Espuma , this way that @v-yamao-msft  shows works too, and with only flow!

 

One point of attention is with 'do until' timeout, the max value you can use is 5000 runs or 30 days, if you put in your delay 1minute the timeout will be reached in 3 days

 

I did for you an example with max timeout in do until and the steps that @v-yamao-msft show, I put here in attachaments, you just need import it.

 

 

 


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


View solution in original post

Espuma
Frequent Visitor

Re: Wait until a field is populated

Hi guys,

 

I have done some tests and it´s working perfectly, thank you very much @gamoraes and @v-yamao-msft for the help in this flow. I also have another question and i´m not sure if i should open another post, wich is how to change automatically the "approval status" when the "approver" approve or rejects the invoice.

 

Thanks,

Highlighted
Super User
Super User

Re: Wait until a field is populated

Fico muito feliz de ter funcionado! Com a cultura de automatização cada vez mais presentes vamos atingir a lua!!!

 

O melhor seria abrir outro tópico para que fique mais intuitiva a comunidade!

 

Poderia por favor marcar as nossas respostas como solução, isso ajuda os outros e nos ajuda também?


Grande Abraço


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


Espuma
Frequent Visitor

Re: Wait until a field is populated

ok, i will open another post, thanks once again!!

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

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