Hi everydoby
I should order table's field UserName
I added an ico
Onselect:
Set(varOrderColum;"UserName");;
UpdateContext({sortDescending1: !sortDescending1})
and for table:
Items:
SortByColumns(
Filter(db_List;StartsWith(Stato.Value; drpState.Selected.Value) );
varOrderColum;Ascending)
but it doesn't order for UserName. Do you have some suggestion?
Many thanks
Hi @Giorgio67 :
As @mdevaney mentioned,it is not available to SORTBYCOLUMNS on a Person field.
I have two alternatives:
Solution1:
Onselect:
Set(varOrderColum;"TheUserName");;
UpdateContext({sortDescending1: !sortDescending1})
Items:
DropColumns(
SortByColumns(
AddColumns(Filter(db_List;StartsWith(Stato.Value; drpState.Selected.Value) );UserName.DisplayName;"TheUserName");
varOrderColum;Ascending);
"TheUserName")
Solution2:
Items:
Sort(Filter(db_List;StartsWith(Stato.Value; drpState.Selected.Value) );UserName.DisplayName;Ascending)
Best Regards,
Bof
@Giorgio67
You can't use SORTBYCOLUMNS on a complex type like SharePoint Person fields. Its just not possible...
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."
Hi mdevaney
in the List is UserName get by Sharepoint (Active Directory); person not group
and in the table as list
When I click on order ico, the table's box became empty
@Giorgio67
What type of data is UserName in SharePoint? A single-line text? A person type?
Can you please show a s screenshot of what happened when you tried the code?
---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."