Skip to main content
Community site session details

Community site session details

Session Id : bTYzSY+rQ+1nB+2hXIQ0SW
Power Automate - Building Flows
Answered

Formatnumber expression can't be a variable or value from Microsoft Form ?

Like (0) ShareShare
ReportReport
Posted on 29 Nov 2023 15:47:50 by 162

Hello,

 

i try to convert number to money

 

if i write 13000, i want 13 000€

 

the expression : formatNumber(variables('rem'),'### ###€')

 

Capture.JPG

 

error details : Unable to process template language expressions in action 'Initialize_variable_2' inputs 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.'.

  • Pstork1 Profile Picture
    67,209 Most Valuable Professional on 29 Nov 2023 at 18:33:52
    Re: Formatnumber expression can't be a variable or value from Microsoft Form ?

    Use Float() in place of int(). The input needs to be a floating point number not an integer.

  • GreguS Profile Picture
    162 on 29 Nov 2023 at 16:36:59
    Re: Formatnumber expression can't be a variable or value from Microsoft Form ?

    I have use this : formatNumber(int(outputs('Get_response_details')?['body/r951198f4776b49bfa11c7446eac83bd2']),'### ###€') for convert number to money

     

    but now i have a new error for populate my sharepoint list ...

     

    The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/R_x00e9_mun_x00e9_ration' is required to be of type 'Number/double'. The runtime value '"18 000€"' to be converted doesn't have the expected format 'Number/double'.

     

     

     

  • GreguS Profile Picture
    162 on 29 Nov 2023 at 16:07:40
    Re: Formatnumber expression can't be a variable or value from Microsoft Form ?

    i have found this and it's good for variable, i don't know if it's possible with my form

  • Pstork1 Profile Picture
    67,209 Most Valuable Professional on 29 Nov 2023 at 16:05:49
    Re: Formatnumber expression can't be a variable or value from Microsoft Form ?

    Sorry, my brain was thinking Power Apps.  For Power Automate you need Float() to convert a decimal number and int() to convert an integer.

  • GreguS Profile Picture
    162 on 29 Nov 2023 at 16:03:08
    Re: Formatnumber expression can't be a variable or value from Microsoft Form ?

     thank you for your reply @Pstork1 

     

    but i don't understand how to convert to number, i don't find a expression value

  • Verified answer
    Pstork1 Profile Picture
    67,209 Most Valuable Professional on 29 Nov 2023 at 15:49:59
    Re: Formatnumber expression can't be a variable or value from Microsoft Form ?

    make the variable type a number or put the variable inside a value() function to cast it to a number when using it.  You can't use FormatNumber() on a string. It has to be a number of some kind.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Loading complete