cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
snaefellnes
Helper II
Helper II

Flows: How to use integer variable?

Hello,

 

(Posted this question yesterday but it was marked as spam, sorry if the previous one is unlocked today and you see this question twice... I'm not stuttering!)

 

I am building a simple flow and want to use an inialiaze variable component. 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.

 

 

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? Is it better to rewrite 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
SteveYao
Community Support
Community Support

Hi @snaefellnes 

 

You may cast your value as integer by using this 

int(triggerBody()['varSiteId_Value'])
fill above formula in the Value field.

View solution in original post

1 REPLY 1
SteveYao
Community Support
Community Support

Hi @snaefellnes 

 

You may cast your value as integer by using this 

int(triggerBody()['varSiteId_Value'])
fill above formula in the Value field.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,515)