Forum Discussion

pjaroch's avatar
pjaroch
Copper Contributor
Nov 03, 2020

Problem with the flow of invoices

Hi,

 

I created an automated flow which starts and is based on Forms.

When our employee adds the customer and order details and clicks Send it's aggregated to the Excel on OneDrive and then all the details are beeing sent to our Accounting department.

 

The problem we are facing is that when an Accounting dept. employee recieves these details - she/he has to respond in another Forms if the details are fine and there is a place to put (upload) that finished Invoice.

 

But at the testing stage (when I gave a link to the starting Forms to our employees) we have noticed that when Accounting dept. employee responds in Forms at "Po przesłaniu nowej odpowiedzi 2" or "Po przesłaniu nowej odpowiedzi 3" if there is more than one Flow awaiting - she/he is not sending the Invoice to the correct employee.

 

It looks like she/he is always answering through the Forms to the NEWEST recieved flow. I guess it could be the problem with ID Key but I am not sure.

We need it to work for more than one flow at once. Accounting dept. member responds to the flows once a day (at the end of the day). They have a dedicated e-mailbox to recieve and respond to the flows.

This has to work in such a way that the oldest email still answers through the Forms the right person. Now person A, starting the workflow at 12:00, waits for a reply. Another person B is also waiting for a reply at 13:00.
The accountant by clicking on the answer for person A will send the answer to person B...

How can I fix it?

 

How it looks like in general:

Starting flow with Forms -> Getting informations from Forms to Excel -> Sending an email to the Accounting department with all of the informations. At the bottom there are to links to another Forms (one to approve and send an invoice, another to decline and send information about missing/wrong details)

 

Thank you in advance for your help.

Pawel

 

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    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

    • pjaroch's avatar
      pjaroch
      Copper 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

      • RobElliott's avatar
        RobElliott
        Silver 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

Resources