cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Oliver_Germany
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
v-alzhan-msft
Community Support
Community Support

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
IRQ16
Frequent Visitor

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.

Hi,

 

Okay, this explains the error.

 

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

 

 

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

v-alzhan-msft
Community Support
Community Support

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

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

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (87,722)