Dear community,
TLDR: I try to access a table column with the name "Anzahl", "StartDate" or "EndDate" and I must access it by typing "cr030_anzahl", "cr030_startdate" or "cr030_enddate". Why?
I just had a sorting problem that took me multiple hours to solve, but I still don't understand my solution. I use a gallery that receives Data from a standard-Data-Table (should be Dataverse). The gallery has a search textfield attached to it, with
gallery.items = SortByColumns(Search(AddColumns(borrows;"AssetName";Asset.Name;"Name";Person.Name;"ProjectName";Project.Name);tbSearch.Value;"Name";"ProjectName";"AssetName");varSortBy;If(varSortOrder;Ascending;Descending))
I used addColumns here to make the lookup-columns be text-columns searchable (to be precise: add a searchable text-copy of them). The table has Columns with the names "Asset" (lookup), "Person" (lookup), "Anzahl" (number), "StartDate" (Date), "EndDate" (Date), "Comment" (Text)
Now my problem is/was the following: To sort the data, my power app has images acting as sort buttons, that are coded like
image.OnSelect = If(varSortBy="cr030_startdate";Set(varSortOrder;!varSortOrder);varSortOrder=true);;
Set(varSortBy;"cr030_startdate")
to make sure the first click on the image sorts ascending, the second click sorts descending.
But WHY is the name of the column "cr030_startdate" and not "StartDate"? If I i.e. try to add a column "StartDate" in the AddColumns command, then powerapps for teams tells me "Error: There is already a column named 'StartDate'." But if I use it in the SortByColumns-command, powerapps for teams says that there is no column with this name. Instead, one of the appearing auto-suggestions is "cr030_startdate" and that one works. Is there an issue with capital letters? I couldn't find anything on the API.
I'd be very thankful if someone could enlighten me.
Jules
Hi @JulesPeace ,
One is the displayname of the column and the other is the name of the column.
Some functions use the column's name and some functions use the column's displayname.
Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2