cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

populate dropdown elements with formula

I've a sharepoint list (named: myTable), with value like this:

 

Name| MyHighNumber

_________________________

A        |    4

B        |    6

C        |    2

D        |    3

 

In a gallery , I have a dropdown element. I'd like to have the dropdown values generated by a formula, as follows:

At element A, I'd like to have the values 4,3,2,1, so every value between MyHighNumber value and 1.

At element B, 6,5,4,3,2,1 

etc.

 

How can I define values with a formula? Thanks for the help!

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Thanks @RandyHayes  and @yashag2255 ,

in the end, this was the working version:

 

FirstN([1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;];(ThisItem.MyHighNumber))

 

Thanks a lot again, its working now.

View solution in original post

4 REPLIES 4
Dual Super User II
Dual Super User II

Hi @Anonymous 

 

For doing so, you can set the dropdown items to below mentioned expression:
FirstN([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],ThisItem.MyHighNumber)
Currently, this list supports value till 20. If you have MyHighNumber more than 20, then you can just add the list till that number in the FirstN formula.
 
Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Anonymous
Not applicable

Hi @yashag2255 ,

thanks for your reply. I don't know what can be the issue, but I cannot assign this formula to my dropdown Items.

You can see my error is the attachment. Something is not right. Should I make some other change in the settings to enable formula in the Items list?

 

@Anonymous 

Perhaps your locale is the issue, try the formula that @yashag2255 suggested except with this change:

FirstN([1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20];ThisItem.MyHighNumber)
_____________________________________________________________________________________
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!
Anonymous
Not applicable

Thanks @RandyHayes  and @yashag2255 ,

in the end, this was the working version:

 

FirstN([1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;];(ThisItem.MyHighNumber))

 

Thanks a lot again, its working now.

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (13,303)