cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Flow test using a integer variable: The variable of type 'Integer' cannot be initialized or updated with value of type 'String'. The variable only supports values of types 'Integer'.

Hello,

 

I created a SQL Server stored proc which use an integer as a parameter. Trying to use a initialize variable component in a Flow to assign a value:

 

IntVar1.jpg

 

So when testing the, I get prompted to enter a value:

IntVar2.jpg

 

But the test fails:

IntVar3.jpg

 

I guess to use the test interface there must be either a special syntax to use in the prompt value box or to use an integer variable in a flow, it must be bundle with other type of components in order to be recognize as integer. I have found these two discussions although I don't understand how to implement a compose action in my above flow:

https://powerusers.microsoft.com/t5/Building-Flows/Initializing-Integer-Variable/m-p/46116#M4170

https://powerusers.microsoft.com/t5/Building-Flows/converting-string-into-Initializing-Integer-Varia...

 

What would be the point of allowing integer parameter, if they must transformed. Might as well re-write my stored proc and code the parameter as a string and do the conversion in transact-sql, which I'm more familiar with.

 

Thnaks for any help on this!

 

Regards,

 

Eric

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Flow test using a integer variable: The variable of type 'Integer' cannot be initialized or updated with value of type 'String'. The variable only supports values of types 'Integer'.

Hello,

 

The Flow recognizes the input variable as a String rather than an INT, in order to by pass this you will need to convert the String to an INT using the compose action, and then passing in the output to the initialize variable action as mentioned in the below response.

 

https://powerusers.microsoft.com/t5/General-Power-Automate/Casting-string-to-integer/td-p/38378

View solution in original post

2 REPLIES 2
Highlighted
Microsoft
Microsoft

Re: Flow test using a integer variable: The variable of type 'Integer' cannot be initialized or updated with value of type 'String'. The variable only supports values of types 'Integer'.

Hello,

 

The Flow recognizes the input variable as a String rather than an INT, in order to by pass this you will need to convert the String to an INT using the compose action, and then passing in the output to the initialize variable action as mentioned in the below response.

 

https://powerusers.microsoft.com/t5/General-Power-Automate/Casting-string-to-integer/td-p/38378

View solution in original post

Highlighted
Helper I
Helper I

Re: Flow test using a integer variable: The variable of type 'Integer' cannot be initialized or updated with value of type 'String'. The variable only supports values of types 'Integer'.

Thanks for the confirmation!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,989)