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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Adding commas and deci...
Power Automate
Unanswered

Adding commas and decimals to currency: SharePoint Columns to Word Template

(0) ShareShare
ReportReport
Posted on by

Hi all, 

 

I have a workflow that takes values from a SharePoint list and uses the values to populate a Microsoft word template, which then creates a word file.

 

In my SharePoint list, I have currency columns and a calculated column that adds the total of all the currency columns. 

 

My workflow goes like this:

1. User fills out Microsoft form

2. Results populate SharePoint list

3. Approval Workflow is triggered.

4. SharePoint list is updated.

5. SharePoint list populates Word Template.

6. Document/file is created from the template and saved.

 

Test 1 (on created word file):

Currency values have 2 decimal limit, but no comma: 13489.00

Total values have no decimal limit or commas: 14500.0000000000

 

Test 2 (on created word file):

 

I use the following solution here: https://powerusers.microsoft.com/t5/Building-Flows/decimal-place/td-p/50303

 

Currency values have 2 decimal limit, but no comma: 13489.00

Total values have 2 decimal limit, but no comma: 14500.00

 

Question:

 

Is there a solution for me to have both commas and decimals? These values populating word documents that are being used as contracts (for action, signing, etc) so the values need to be specific and easy to read. 

In my SharePoint list, there are no issues with comma or decimal placement, it's only when my workflow takes that same value and inputs it into my word template to create a file that the errors occur. I had expected that it would just display the same value as in my SharePoint list. 

I've created a few initiate/compose steps in my workflows just to create the decimal limit for each of my values, will I need to do so for the commas also? Is there a simpler way to do this? 

TIA

Categories:
I have the same question (0)
  • efialttes Profile Picture
    14,756 on at

    Hi!

    Did you consider using formatNumber() WDL expression or its equivalent FormatNumber action block? Not 100% it matches your expectations, but it is worth to try it. More info here:

    https://flow.microsoft.com/en-us/blog/simplified-number-formatting/

    Hope this helps

  • Community Power Platform Member Profile Picture
    on at

    Thanks for the recommendation @efialttes 


    It works for a standard currency column, but it doesn't work for a calculated column (which is the total of all currency columns). Any thoughts?

    Unity_1-1600388614536.png

     

    Unity_0-1600388556183.png

     

  • Community Power Platform Member Profile Picture
    on at

    I've found a work around where when the item is created in sharepoint, I update the list after, putting the calculated field value into a separate non-calculated currency column. 


    In that context, I can get the Format Number action to work properly. 

    Would still prefer discovering a better/simpler way of doing it so there is less to maintain/fail.

  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    @Anonymous 


    @Anonymous wrote:

    Thanks for the recommendation @efialttes 


    It works for a standard currency column, but it doesn't work for a calculated column (which is the total of all currency columns). Any thoughts?

    Unity_1-1600388614536.png

     

    Unity_0-1600388556183.png

     


     

    Hey Mate,

     

    The Error message tells me that Expect First parameter to be integer but it got a String.

     

    You can first convert the String to Integer(number) and then pass it is Format number

     

     

     

    int(outputs('Compose'))

     

     

     

     

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • efialttes Profile Picture
    14,756 on at

    @Anonymous 

    So you got a workaround? Excellent!

    Now on your first approach, when assigning your calculated column as input for 'Format number', did you try to convert its type (currently string, according to the error you shared) into float by means of float() WDL expression?

    Not with my laptop, unable to test

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard