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
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,372)