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

Set global variable to be a int which is populated from a parameter

Hello,

 

I want to pass in a parameter from my URL which would be a database Id number. However, when I set the variable using OnStart, it defaults to being text.

 

I set the variable by doing:

Set(startScreen, Param("ScreenId"));

 

But then I get errors about a mismatch in datatype. It sets the variable by default to be text, but I need it to be an int.

 

Many thanks!

Dayna

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: Set global variable to be a int which is populated from a parameter

Hi DaynaLitherland,

 

You can try

Set(startScreen, Value(Param("ScreenId")))

Haven't tested this, but in theory it should work 🙂

 

Hope this helps,


RT

View solution in original post

2 REPLIES 2
Highlighted
Microsoft
Microsoft

Re: Set global variable to be a int which is populated from a parameter

Hi DaynaLitherland,

 

You can try

Set(startScreen, Value(Param("ScreenId")))

Haven't tested this, but in theory it should work 🙂

 

Hope this helps,


RT

View solution in original post

Highlighted

Re: Set global variable to be a int which is populated from a parameter

Perfect, as always, a star! Thank you Russel!

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,802)