cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

SharePoint Approval Flow failed when setting field 'Note' to optional

Hi guys,

 

I have created a Flow for sitepages based on the Approval template of SharePoint. The only change I made was setting the 'Note' field to optional.

 

When I test the flow I receive the following error:

 

Unable to process template language expressions in action 'Start_an_approval' inputs at line '1' and column '2306': 'The template language expression 'concat('### Message send with Note:, uriComponentToString('%0A'), uriComponentToString('%0A'), triggerBody()['text'])' cannot be evaluated because property 'text' doesn't exist, available properties are 'entity'. Please see https://aka.ms/logicexpressions for usage details.'.

 

There is a field called 'Details' were I see a concat:

concat('### Message send with Note:', uriComponentToString('%0A'), uriComponentToString('%0A'), triggerBody()['text'])

 

When I change the  'Note' field back to required everything works fine. I could offcourse strip the triggerBody() function, but then the approval E-mail to the approver will not show the Note value if there is one.

 

How could I fix this?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: SharePoint Approval Flow failed when setting field 'Note' to optional

I have fixed the problem by deleting the 'Concat' and just add the 'Details' als expression. Everything works fine. 

The problem was that the concat was expecting 'text' and broke when text was empty. 

View solution in original post

5 REPLIES 5
Highlighted
Dual Super User
Dual Super User

Re: SharePoint Approval Flow failed when setting field 'Note' to optional

@DennisConNL  Can you share a link to the Template you are using? Just to understand better the issue

 

I guess if input Note is stored in triggerBody()['text'] and you make this input optional, you should take into account scenarios where such input is not filled in.

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Regular Visitor

Re: SharePoint Approval Flow failed when setting field 'Note' to optional

I don't have a exact url cause I have created the Flow from a SharePoint Documentlibrary but creating a standard approval flow. I found it weird that when you use a SharePoint standard flow you cannot change the 'Note' field from required to optional. 

 

 

Highlighted
Dual Super User
Dual Super User

Re: SharePoint Approval Flow failed when setting field 'Note' to optional

@ZSDennis 

So I guess in order to select the TEmplate, you selected the option "Create Flow" from a Sharepoint List top menu, and chose one of the TEmplates displayed on the right, is my assumption correct? The reason I am asking for more details is that if you click on  "Show more" you will realize there are tons of Sharepoint standard templates 😞

FlowSharepointTEmplates.png

 

By Template URL I meant the URL displayed in the browser once you finally select one of the Templates displayed on the right. you click on it, your browser automatically opens a new tab pointing to the selected Template URL. This URL can help us identify unambiguously the template you are using.

 

FlowSharepointTEmplates_2.png

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
New Member

Re: SharePoint Approval Flow failed when setting field 'Note' to optional

Highlighted
Frequent Visitor

Re: SharePoint Approval Flow failed when setting field 'Note' to optional

I have fixed the problem by deleting the 'Concat' and just add the 'Details' als expression. Everything works fine. 

The problem was that the concat was expecting 'text' and broke when text was empty. 

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new 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!

Top Solution Authors
Top Kudoed Authors
Users online (7,637)