cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JulesPeace
New Member

Accessing Table columns from Dataverse in Powerapps for teams

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

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

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.

 

vxiaochenmsft_0-1627349955808.png

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

View solution in original post

1 REPLY 1
v-xiaochen-msft
Community Support
Community Support

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.

 

vxiaochenmsft_0-1627349955808.png

 

Best Regards,
Wearsky
If my post helps, then please consider Accept it as the solution to help others. Thanks.

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Users online (1,945)