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'])
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.'."
Does anyone have suggestions on what I should try next?
Solved! Go to Solution.
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.
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...
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?
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?
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.