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 / Convert text to currency
Power Automate
Unanswered

Convert text to currency

(0) ShareShare
ReportReport
Posted on by 20

Hello everyone,

 

I want to create a flow that transfers data from Microsoft Forms to a Microsoft SharePoint list. In the form I have a field for entering an amount. Now when the flow starts, the following error message appears:

 

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

 

I have tried the following actions:

 

  1. Initialize variables with type string
    Bildschirmfoto 2023-06-29 um 13.05.46.png
  2. Compose with the expression int(variables('EK - Volumen'))
    Bildschirmfoto 2023-06-29 um 13.06.10.png
  3. Convert numbers 
    Bildschirmfoto 2023-06-29 um 13.06.57.png

I also tried to set the restriction to numbers in the form, unfortunately also no success. In this case the amount 0,00 € is entered as value in the list.

 

Does anyone have a tip on how I can build the flow so that the text is converted to a currency?

 

In the SharePoint list the column is also formatted as currency.

 

Thanks a lot.

 

Many greetings

 

Kai

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @Kai_U_P,

     

    In the screenshot I don't see how you are using the answer from the form question/response. Can you share a screenshot where you are setting your variable with this value?

     

    I tried to reproduce your issue with the same setup. When I am input 0,00 as a string value in the variable it seems to work fine.

     

    Below are screenshots of my test/repro.

     

    1. The setup with the 0,00 value in the variable

    reproduce_000.png

     

    2. The output of the flow run with a euro currency symbol.

     

    reproduce_000_02.png

  • Community Power Platform Member Profile Picture
    on at

    Dear Expiscornovus,

     

    Thank you very much for your response. I found the error in the flow. The problem was that I had not entered the form field as the value here.

     

    Bildschirmfoto 2023-07-03 um 09.02.26.png

     

    Now I have another problem. As soon as I enter the amount in the form, it is transferred to the SharePoint list with incorrect formatting. Instead of 123,33, 12.333,00 is now deposited.

     

    This is the result of the action get form details

    Bildschirmfoto 2023-07-03 um 09.07.52.png

     

    This is the result of the action initialize variables

    Bildschirmfoto 2023-07-03 um 09.19.34.png

    And this is the result of the compose action

    Bildschirmfoto 2023-07-03 um 09.19.50.png

    I don't know, how I convert the input in the correct currency.

     

    This is the form field for querying

    Bildschirmfoto 2023-07-03 um 09.22.16.png

  • Verified answer
    Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @Anonymous,

     

    That is because a comma is used to separate the euro cents (which is understandable, because that is a normal format in the EU). The format number action expects a dot for this. You can use a replace function for this.

     

    Secondly, you are using an int function, which will convert the answer into a whole number. In that case try and use a float function, which support decimals.

     

    Try this in your compose:

    float(replace(variables('EK - Volumen'), ',', '.'))

     

  • Community Power Platform Member Profile Picture
    on at

    Hello Expiscornovus,

     

    Please apologize for my late reply. unfortunately i did not have time to test your solution suggestion this week.

     

    I've tested your suggestion and it worked 🙂 Thank you very much.

     

    Have a nice weekend.

     

    Kai

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard