cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kevingeorget
Resolver I
Resolver I

Flow failing when called from PowerApps form

I've a flow that's triggered from my SharePoint PowerApps form.

There are four buttons in the form that calls the same flow but with different parameters as below-

1. SubmitForm(SharePointForm1); 'TestFlow'.Run(SharePointForm1.LastSubmit.ID,"Complete")
2. SubmitForm(SharePointForm1); 'TestFlow'.Run(SharePointForm1.LastSubmit.ID,"Reject")
3. SubmitForm(SharePointForm1); 'TestFlow'.Run(SharePointForm1.LastSubmit.ID,"Approve")
4. SubmitForm(SharePointForm1); 'TestFlow'.Run(SharePointForm1.LastSubmit.ID,"RejectInputs")

 

Whenever i make a change to the PowerApps form and publish it (changes not related with the flow button or parameters), this flow tend to fail on the next run.

The error is-

Flow Error.PNG

 

From the flow run, i could see the Item ID is correctly passed.

The fix currently i do is to remove the reference of the flow from the form and re add it again for each of the 4 buttons and publish it again.

Any reason why this error occurs?

 

3 REPLIES 3
v-siky-msft
Community Support
Community Support

Hi @kevingeorget 

 

Can you share more details with your flow? Have your ever do any changes to the list (add/remove/change the column)?

Currently, I am not sure how does this error happen because the lack of information, but you can try to remove and re-add the flow to check if it can work well.

Also, could you try to create four flow with the same action, assign them to each button to check if this issue is fixed?

Best regards,

Sik

Thanks @v-siky-msft for the reply.
Let me try explaining the scenario-

Out of the many fields in my list, i have a status field which can take values 'Pending' and 'Send for Review'.

When Status is 'Pending'-
Two buttons are visible-
Complete and Reject

When Status is 'Send for Review'-
Two buttons are visible-
Approve and RejectInputs

OnSelect property for the buttons are as follows-
Complete- SubmitForm(SharePointForm1); 'TestFlow'.Run(SharePointForm1.LastSubmit.ID,"Complete")
Reject- SubmitForm(SharePointForm1); 'TestFlow'.Run(SharePointForm1.LastSubmit.ID,"Reject")
Approve- SubmitForm(SharePointForm1); 'TestFlow'.Run(SharePointForm1.LastSubmit.ID,"Approve")
RejectInputs- SubmitForm(SharePointForm1); 'TestFlow'.Run(SharePointForm1.LastSubmit.ID,"RejectInputs")

 

As you can observe its the same flow that gets called, but the 2nd parameter changes. And in my flow, i use a Switch case to handle the 4 cases.

#Have your ever do any changes to the list (add/remove/change the column)?
No. I update the PowerApps form and publish it at times without touching the above functionality. But this throws the error mentioned.

#but you can try to remove and re-add the flow to check if it can work well.
if i remove and re-add the flow, the issue gets fixed, But at a later stage, if i publish this again, the issue crops up again.


#Also, could you try to create four flow with the same action, assign them to each button to check if this issue is fixed?
Created 3 duplicate flows and assigned each one to the buttons. The error still appears after i make some change at a later stage.

oneflowerror.JPG

The powerapps trigger gets the item id correctly, but still the Get item action fails.

 

oneflowerror2.JPG

 

Generic Error in detail-

Unable to process template language expressions in action 'Get_item-_Task_Item' inputs at line '1' and column '2228': 'The template language expression 'json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_sharepointonline']['connectionId']' cannot be evaluated because property 'shared_sharepointonline' doesn't exist, available properties are 'shared_sharepointonline_2, shared_office365_1, shared_outlook'. Please see https://aka.ms/logicexpressions for usage details.'

 

Hi,

  Did you get fix for this? Even i am facing same issue, If i run test flow sharepoint connection is fine, but same if i trigger from powerApp it isnt working. Getting same error.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (3,465)