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,
Solved! Go to Solution.
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.
Best regards,
Mabel
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.
Gustavo Moraes, o astronauta brasileiro do Flow!
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
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
Gustavo Moraes, o astronauta brasileiro do Flow!
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.
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.
Gustavo Moraes, o astronauta brasileiro do Flow!
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.
Best regards,
Mabel
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.
Gustavo Moraes, o astronauta brasileiro do Flow!
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,
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
Gustavo Moraes, o astronauta brasileiro do Flow!
ok, i will open another post, thanks once again!!
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
19 | |
12 | |
9 | |
8 | |
4 |
User | Count |
---|---|
24 | |
15 | |
12 | |
12 | |
10 |