cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IPC_ahaas
Post Patron
Post Patron

Populate Drop Down List Based on Number Value

I have a Label with the number 7 (for example). I want a Drop Down list to have choices 0-7 based on that Label. If the Label were to be 12, then I'd want the Drop Down list to have choices 0-12. Is there a way I can essentially create a counting loop of values for a Drop Down list based on a Label's value?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@IPC_ahaas 

Sure...change to:

Sequence(Value(yourLabel.Text) + 1, 0)
_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
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

4 REPLIES 4
RandyHayes
Super User
Super User

@IPC_ahaas 

Set your Items property of the Dropdown to:

Sequence(Value(yourLabel.Text))

 

This will provide what you are looking for.

 

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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

Wow, this works almost perfect. Is there a way I can include 0? Right now, if the "yourLabel1.Text" is 0, it makes it blank.

RandyHayes
Super User
Super User

@IPC_ahaas 

Sure...change to:

Sequence(Value(yourLabel.Text) + 1, 0)
_____________________________________________________________________________________
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.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

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

Yes! Thank you! @RandyHayes 

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.

Users online (1,744)