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 / conversion issue strin...
Power Automate
Unanswered

conversion issue string to int

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have a string value pulled from excel of '23'. 

I need to add this to a running total, but INT is not working. If I run int(variable.....) it fails with error :-

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

 

If I try with direct string it fails with :-

The variable 'mtest' of type 'Integer' cannot be initialized or updated with value '23' of type 'String'. The variable 'mtest' only supports values of types 'Integer'. (Did this as a sanity check)

 

Steps-

Read excel rows.

In apply all.

Move field to variable (MtestS) string variable.

inc variable (mtest) integer 

Categories:
  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @Anonymous 

    I'm not sure why this is happening and I can't seem to replicate it.  However, try this - assign your string value to a Compose action.  Then, reference the Compose action when adding to your running total - you shouldn't need the int() expression as Flow should handle this for you automatically.

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @ 

     

    HI, I then get the same error :-

     

    The variable 'mtest' of type 'Integer' cannot be initialized or updated with value '' of type 'String'. The variable 'mtest' only supports values of types 'Integer'.

     

    If I int it. I get 

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

     

    Ideas please?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I have done an experiment, in that I created a brand new excel sheet. With just dummy data.

     

    The flow then works!

     

    I assign the excel field to a string variable

    then increment the integer field using Int(....) 

     

    Why is one sheet working but another does not? Can I resolve? what is the cause?

  • reyramirez Profile Picture
    4 on at

    I know it's been over 2 years but I also had an issue where excel stopped reading my time as an integer and my flow was failing. I saw your post about the dummy sheet and so I proceeded to delete the column and insert a new column with the same data and that corrected my flow. Not sure why this happened. Thank you! 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard