Hello,
I grabbed a friend's Power Apps project to help him work on it, but I don't understand a formula he put on the "OnSelect" property of his dropdown.
Could you please explain this formula to me? Thank you in advance!
ClearCollect(
colCategorie;
{Result: ""};
Sort(
Distinct(
Categorie;
Categorie
);
Result
))
Thank you so much ! It's much clearer thanks to you!
Hi @s44 ,
Looking at this formula it is probably used to populate a dropdown or combobox to select a category as part of some filter statement. I added comments that will hopefully clarify:
// This formula creates a collection (colCategorie) with a single column called Result
ClearCollect(
colCategorie;
//This adds an empty item at the beginning of the collection
{Result: ""};
//Further items are added extracting the unigue values from the Categorie data source, in the Categorie column and those are then sorted alphabetically, ascending.
Sort(
Distinct(
Categorie;
Categorie
);
Result
))
WarrenBelz
146,618
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,962
Most Valuable Professional