Skip to content

La vie rêvée d’Akim

…ou le zèbre qui voulait être un homme

  • Style de vie
  • Informatique
  • Photographie
  • Musique
  • English (US)English (US)
  • FrançaisFrançais

Populate a Microsoft Power Apps drop down with a list of unique items, and no blank value

Posted on Friday 15 January 2021 - Friday 15 January 2021 by Akim

I’ve been struggling for a while, yet I sorted it out. Wooohooo.

The challenge

I’ve been trying to populate a drop down list in a Powerapp application. The source is a column called “Category” in an Excel document stored on OneDrive. The Category column contains redundant data and empty records. The drop down list has to be populated with single occurrence of categories and but not show an empty line. I want them the list to be alphabetically sorted.

The solution

It requires to encapsulate multiple functions. This is the function you have to put in your “Items” field for the drop down.

SortByColumns(Distinct(Table1,If(Not(IsBlank(Category)),Category)),"Result")

Table1 is my source table. Category is my source column (or field). Not(IsBlank(Category)) will collect the full list except blank records. Distinct will then remove duplicates from the list. Finally, SortByColumns will sort the results based on the Category field. By default, sorting will be ascending.

Here we are.

Posted in InformatiqueTagged Microsoft Power Apps

Post navigation

Shrewsoft VPN Client connection automated
Python: Download ZIP and parse URL from text file

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Proudly powered by WordPress | Theme: micro, developed by DevriX.