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

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
Highlighted

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
Highlighted
Dual Super User III
Dual Super User III

Hi @cybercy 

 

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!
Highlighted

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?

 

Highlighted

@cybercy 

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!
Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

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