I have a Gallery that is connected to a Sharepoint List "HMH Administrators List"
The Gallery gets it's values from a Dropdown called :
scr04_drpAccountsActiveFilter
In the list are 3 Columns :
Active (Yes/No Text Column)
HMHAdministratorsEmail (Text Colum)
HMHAdministratorsDisplayName (Text Column)
which are populated from an Office365User patch process.
I want to sort the Gallery into Ascending order of the HMHAdministratorsDisplayName value.
When the Screen is opened "Screen On Visible" i define a Collection :
ClearCollect(collectAdministratorFilterChoices, ["All","Yes","No"]);
Which adds "All" to a Dropdown Box Item list (scr04_drpAccountsActiveFilter)
On the Gallery Item choice i added this code:
SortByColumns('HMH Administrators List',"HMHAdministratorsDisplayName",SortOrder.Ascending
which seemed to work (hopefully avoiding delegation issues too)
i tried adding this code too but get an error. (not sure how to use both code snippets together. As i get an error that is vague, i don't understand it and can't use it.
If(scr04_cmbAccountsActiveFilter.Selected.Value="All",'HMH Administrators List',Filter('HMH Administrators List',Active=scr04_drpAccountsActiveFilter.Selected.Value))
Basically is there a way to add these two snippets together on the Gallery Item and still avoid delegation issues. I want all Filter choices "All","Yes","No" to be filtered ascending on the HMHAdministrationDisplayName column.
SortByColumns('HMH Administrators List',"HMHAdministratorsDisplayName",SortOrder.Ascending
and
If(scr04_cmbAccountsActiveFilter.Selected.Value="All",'HMH Administrators List',Filter('HMH Administrators List',Active=scr04_drpAccountsActiveFilter.Selected.Value))
or an alternative more than appreciated. My skills are limited at the moment.
Thanks