cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

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

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?

 

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

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
News & Announcements

Community Blog

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

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (6,313)