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

conversion issue string to int

(0) ShareShare
ReportReport
Posted on by

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:
I have the same question (0)
  • ScottShearer Profile Picture
    25,270 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
    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
    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

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard