cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jbrit2020
Super User
Super User

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
Super User

@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 below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
gabibalaban
Super User
Super User

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
Super User

@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 below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Thanks! That solved the issue

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,886)