cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
DennisConNL
Level: Power Up

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
DennisNL2020
Level: Power Up

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
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

 





If anyone is trying to help you with an issue, the fastest way to say thanks is by kudoing. Be grateful, Thumbs up!

Proud to be a Flownaut!





ZSDennis
Level: Powered On

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. 

 

 

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





If anyone is trying to help you with an issue, the fastest way to say thanks is by kudoing. Be grateful, Thumbs up!

Proud to be a Flownaut!





DennisConNL
Level: Power Up

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

DennisNL2020
Level: Power Up

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

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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,285)