Hi,
I am trying to follow along on this video where there is a need to get around delegation. My Sharepoint list has a Title, Account Type (Choice column) & Account Rating (Choice Column). I
My function was working fine before I tried to implement the Switch to address delegation.
Switch(
varAccountsBrowseSortColumn,
"Title",
SortByColumns(
Filter(
'Accounts',
StartsWith(
Title,
txtinpAccountsSearch.Text
) && ('Account Rating'.Value = drpAccountRating.Selected.Value || drpAccountRating.Selected.Value=Blank()) && ('Account Type'.Value = drpAccountType.Selected.Value || drpAccountType.Selected.Value=Blank())
),
"Title",
If( varAccountsBrowseSortColumn = Ascending, Ascending,Descending)),
"Account Rating"
SortByColumns(
Filter(
'Accounts',
StartsWith(
Title,
txtinpAccountsSearch.Text
) && ('Account Rating'.Value = drpAccountRating.Selected.Value || drpAccountRating.Selected.Value=Blank()) && ('Account Type'.Value = drpAccountType.Selected.Value || drpAccountType.Selected.Value=Blank())
),
"Account Rating",
If( varAccountsBrowseSortColumn = Ascending, Ascending,Descending)),
"Account Type",
SortByColumns(
Filter(
'Accounts',
StartsWith(
Title,
txtinpAccountsSearch.Text
) && ('Account Rating'.Value = drpAccountRating.Selected.Value || drpAccountRating.Selected.Value=Blank()) && ('Account Type'.Value = drpAccountType.Selected.Value || drpAccountType.Selected.Value=Blank())
),
"Account Type",
If( varAccountsBrowseSortColumn = Ascending, Ascending,Descending))
)
Thanks in advance for any assistance.
Cheers
Todd