cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jbrit2020
Helper V
Helper V

Numeric Values in Dropdownbox In Component

So, I have a component with 5 dropdown boxes, and I need them to have numeric values stored as integer and not text as I will have to apply some maths to the selection. In order to do this, I've set a global variable with the following:

 

Set(CatRisks,
Table(
{Cat:1},
{Cat:2},
{Cat:3},
{Cat:4},
{Cat:5}
)
);

 

This works great as long as the dropdown boxes are outside of the component. Inside of the component I can't reference APP variables. Which other way do I have to define numeric values on the dropdown boxes inside the component?

 

Regards

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@jbrit2020 

Create a Property on your Component as a Table property (let's call it ListOfNumbers)

Set the dropdown items property in the Component to : yourComponentName.ListOfNumber

 

Then from your app, set the property yourInsertedComponentName.ListOfNumbers to CatRisks

 

I hope this is helpful for you.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

3 REPLIES 3
gabibalaban
Super User II
Super User II

Hi @jbrit2020 ,

Did you try to use the Reset() property of the component to set this global variable inside component ? 

And on the app use on OnVisible property of the screen Reset(component). Be sure not to use the same variable in other places of the app, because it is still a global variable.

 

Hope it helps ! 

RandyHayes
Super User III
Super User III

@jbrit2020 

Create a Property on your Component as a Table property (let's call it ListOfNumbers)

Set the dropdown items property in the Component to : yourComponentName.ListOfNumber

 

Then from your app, set the property yourInsertedComponentName.ListOfNumbers to CatRisks

 

I hope this is helpful for you.

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Thanks! That solved the issue

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (55,967)