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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,250)