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 / Formatting texts and v...
Power Automate
Answered

Formatting texts and values

(0) ShareShare
ReportReport
Posted on by 380

Hello!

I am having a brain meltdown right now with regional number formatting.

I live in Chile, so my number formatting is commas for decimals and dots for thousands.

My flow is populating a word (I have the premium connector) with information from a Sharepoint (this sharepoint gets populated from a power Apps)

My drama began in PowerApps because of the **bleep** keyboard, but it was solved and it is working (I had to use substitutes to work around the problem)

So, I am patching the Sharepoint list with values from PowerApps, but my list is set as Text (otherwise stupid comma gets replaced by dots and it is all a mess)... and this shows me the info as I need it.

When I run my flow, I get the data perfectly if I use

string(items('Aplicar_a_cada_uno')?['field_7'])

Fernanda_0-1673528615452.png

 

... BUT... there is one more format I need for the word. And that is adding the dot for thousands.

Fernanda_1-1673528641918.png

Meaning, in column Consumo, my populated word should show 3.265,15, and if it a round number, no comma to be shown.

 

And here my brain just melted... I tried splitting the string and give it format only to the first part of it, but couldn't do it.

 

Can you help me, please??? I am totally stuck 

 

Categories:
I have the same question (0)
  • grantjenkins Profile Picture
    11,063 Moderator on at

    You should use Format Number using the connector or as an expression. See example below using the connector (not sure if I got the exact locale).

     

    grantjenkins_0-1673536877674.png

     

    The result after running the flow:

    grantjenkins_1-1673536957298.png

     

    See further details here.

    Standard numeric format strings | Microsoft Learn


    ----------------------------------------------------------------------
    If I've answered your question, please mark the post as Solved.
    If you like my response, please consider giving it a Thumbs Up.

  • Fernanda Profile Picture
    380 on at

    Hello!

    It won't work, because my SP List is fixed as Single Line Text

    Unable to process template language expressions for action 'Formato_de_número' at line '0' and column '0': 'The template language function 'formatNumber' expects its first parameter to be an integer or a decimal number. The provided value is of type 'String'. Please see https://aka.ms/logicexpressions#FormatNumber for usage details.'.

    Fernanda_0-1673546362052.png

     

  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    You can use the following formula to convert the string representation of the number to a float.

     

    float(replace(replace(variables('number'), '.', ''), ',', '.'))

    grantjenkins_1-1673568736891.png

     

    Or using an expression to format the number.

    formatNumber(float(replace(replace(variables('number'), '.', ''), ',', '.')), 'N', 'es-CL')

    grantjenkins_2-1673568898004.png


    ----------------------------------------------------------------------
    If I've answered your question, please mark the post as Solved.
    If you like my response, please consider giving it a Thumbs Up.

  • Fernanda Profile Picture
    380 on at

    Hi!.. it didn't work. I can't iniciate a variable from a Get Items Action... Apply to each won't let me

    Fernanda_0-1673571374027.png

     

  • grantjenkins Profile Picture
    11,063 Moderator on at

    Inside your loop you would be retrieving the value from your field and wrapping that inside the expression instead of using a variable.

  • Fernanda Profile Picture
    380 on at

    it worked!!!

    thanks a lot!!!

    my brain was literally melted!

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 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard