Forum Discussion
Problem with the flow of invoices
pjaroch the problem is you have got 3 triggers in your flow for when a new response is submitted. You can only have 1 trigger. I suggest you save the first form response to a SharePoint list which has a column for each answer in the form, columns for the approval/rejection decision and date and any comments. You should also then have 2 single line of text columns, one to have a JSON-formatted button to trigger the flow if the invoice details are OK, and a similar column to trigger the other flow if the details are not OK. So you would have 3 flows, but the way you have it at the moment won't work.
This is an image of 2 buttons on a list column:
and each column is formatted as follows. You need to change the txtContent line to the test you wanton the button, and you also need to change the ID of the flow to your flow's ID:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"txtContent": "Publish",
"customRowAction": {
"action": "executeFlow",
"actionParams": "='{\"id\": \"' + if([$Control] =='','d4e4bb15-504f-44d5-b94c-745ddc4ce1bb','')+ '\"}'"
},
"style": {
"background-color": "=if(([$Control] == 'Published'),'#333333','#1f5f61')",
"color": "white"
}
}
Rob
Los Gallardos
Microsoft Power Automate Community Super User
- pjarochNov 04, 2020Copper Contributor
--
Hello RobElliott
Thank you for your support in this case! I would like to tell you more about my flow. These 3 triggers unfortunately are not all triggers that I need. Am I able to show you more screenshots through the e-mail or in a private message?
All the triggers I used are over here:
Some of them are repeated, because I need them to send it, then other person has to approve or decline it, then if its approved they have to say if the invoice is right or not. If its ok then the flow is finished. If its not ok they have to upload it again and then its finished. But when we go back to "5" and its declined there has to be the description why it was declined, they have to add it again and the steps are the same - they have to check it, approve it or decline it, add it again if its declined etc...
Haha it will be a bit elaborate, but our process requires that kind of stuff. Do you have any ideas? Should i still use Sharepoint List to make it work well? Thank you for all the support 😄
Pawel
- RobElliottNov 04, 2020Silver Contributor
pjaroch sorry but that just isn't do-able. A flow can't trigger a form to be sent, there is no action for that, the flow just waits for when a form has been submitted. And as I said earlier, you can only have 1 trigger in a flow. So you are going to have to re-think and I do think a SharePoint list is the best way to go to hold the status of the invoice and approvals as I said earlier, and then use "Start and wait for an approval" action in the flow.
Rob
Los Gallardos
Microsoft Power Automate Community Super User