Hi,
I would like to know how to create a collection for a drop-down against a number value column that contains an “All” option.
Columns:
Location ID - Choice
Unit number - number
Previously, the unit number column in the SPO list was a single line text field. However, we encountered issues of users entering data incorrectly and also were not able to sort the values, so changed the column to a number value. The below code was allowing an “All” option to be selectable when the column was a single line text field.
OnVisible =
ClearCollect(colLocation, {Result:"All"});
Collect(colLocation, Sort(Distinct('ListName',Location.Value),Result));
ClearCollect(colUnit,{Result:"All"});
ClearCollect(colUnit, Sort(Distinct('ListName', 'Unit number'),Result));
Thank in advanced!
Make use of combo box and add filters of isbank and isempty for all components of the list and make use of distinct and sort by column to sort data in combobox
Hi @TarenBhutch :
Please set the gallery's items property to:
If(
'Location ID Combobox'.Selected.Result="All" && 'Unit number Combobox'.Selected.Result="All",
ListName,
'Location ID Combobox'.Selected.Result="All",
Filter(ListName,'Unit number'='Unit number Combobox'.Selected.Result),
'Unit number Combobox'.Selected.Result="All",
Filter(ListName,Location.Value='Location ID Combobox'.Selected.Result),
Filter(ListName,'Unit number'='Unit number Combobox'.Selected.Result && 'Location ID Combobox'.Selected.Result)
)
Best Regards,
Bof
User | Count |
---|---|
253 | |
106 | |
94 | |
50 | |
39 |