cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Format number action output cannot be used in approval

Dear community,

 

I am running into an issue that I cannot solve.

 

I use a Format Number action to ensure that numbers are looking nice in the approval Email.

 

However, the flow keeps failing with the following message when it try to create the approval: Unable to process template language expressions in action 'Start_and_wait_for_an_approval_2' inputs at line '1' and column '2924': 'The template language expression 'body('Format_number_-_Current_Credit_Limit')?['body']' cannot be evaluated because property 'body' cannot be selected. Property selection is not supported on values of type 'String'.

 

Here is the output from the Format number action:

Capture.JPG

 

I really do not understand why the error message mentions a string as this is clearly recognized by Format number as a number and also property formatted.

 

Where is the error?

 

Regards,

 

Oliver

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Format number action output cannot be used in approval

Hi @Oliver_Germany ,

 

The  expression 'body('Format_number_-_Current_Credit_Limit')?['body']' is wrong.

 

The expression of the Format number action output should as below:

outputs('Format_number_-_Current_Credit_Limit')?['body']

1.png

Please take a try.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Frequent Visitor

Re: Format number action output cannot be used in approval

Hey Oliver, the Format Number action is outputting as a String hence the error you're experiencing. The formatNumber() function also outputs as String, too.

Highlighted
Helper I
Helper I

Re: Format number action output cannot be used in approval

Hi,

 

Okay, this explains the error.

 

But why can't I use the action in an approval? Is there any work-around?

 

 

Highlighted
Frequent Visitor

Re: Format number action output cannot be used in approval

Would you mind sharing your Flow so we can see what you’re trying to build?

Highlighted
Community Support
Community Support

Re: Format number action output cannot be used in approval

Hi @Oliver_Germany ,

 

The  expression 'body('Format_number_-_Current_Credit_Limit')?['body']' is wrong.

 

The expression of the Format number action output should as below:

outputs('Format_number_-_Current_Credit_Limit')?['body']

1.png

Please take a try.

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper I
Helper I

Re: Format number action output cannot be used in approval

Hi @v-alzhan-msft , 

 

Thanks for the hint, it works as intended.

 

Just one more question:

I tried to figure out why the expression has changed.

 

I have a multi-stage approval process, in which basically the same Email is send to approves further down the chain. I tried to save time and copy-pasted the first Email in to latter ones. Doing so changes the expression from 'outputs' to 'body'.

 

Is this correct?

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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,595)