web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Mapping List Calculate...
Power Automate
Answered

Mapping List Calculated Column Value to Word Template

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm building a flow to take a List item's values, map them to a Microsoft Word template, and save it as a proposal document.  Initially, I ran into issues with formatting the calculated values correctly as currency in the Word template, but I found how to Compose the value as an integer and format it appropriately, as shown in the screenshot below:
Compose function - int(triggerBody()?['CalculatedColumn'])

 

simpkinspete_0-1614893472235.png

 

Now I'm running into issues with two values that are unable to be converted to integers.  

 

"Unable to process template language expressions in action 'Compose' inputs at line '1' and column '3042': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'."

 

simpkinspete_1-1614893843235.png

 

Does anyone have suggestions on what I should try next? 

Categories:
I have the same question (0)
  • Paulie78 Profile Picture
    8,422 Moderator on at

    You need to find out what the value was that it could not convert. You could put a compose before that compose that just has the value that you are trying to put into the int function. Then we can tell you how to fix it.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Do you need the raw inputs/outputs? 

     

    simpkinspete_0-1614894533552.png

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    simpkinspete_0-1614894782629.png

     

  • Paulie78 Profile Picture
    8,422 Moderator on at

    Well, you can't convert it to an int because it does not represent an int. You could use float() or formatNumber function. What value do you want to go into Word? instead of 18.66675000000...

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I'd love to format it as currency and rounded to the nearest cent, $18.67.

  • Verified answer
    Paulie78 Profile Picture
    8,422 Moderator on at

    Then you want something like:

    formatNumber(float(outputs('Compose_2')), 'C2')
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    That worked perfectly.  I'm going to go back and update my previous Compose steps to consolidate the formatting steps. Thanks for your help!

     

    All of my calculated columns in SharePoint are formatted the same way.  Do you have any ideas why my other values could be formatted as integers but not these? 

  • Paulie78 Profile Picture
    8,422 Moderator on at

    I'm not sure I understand the question, in this example it was because the number 18.66675000000 cannot be represented as an integer. Because it has numbers after the decimal point, integers can be made from whole numbers only such as "18". Did I misunderstand the question?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    No, that makes sense.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 550

#2
Valantis Profile Picture

Valantis 390

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard