Showing results for 
Search instead for 
Did you mean: 
Post Patron
Post Patron

Powerapps automatically changes my code into something that doesn't function

In an earlier post I had an issue with a collection that is Clearcollected from a table and shown in a gallery.

If I wanted to get to the record from the gallery that did not always work.

When viewing the collection in powerapps I noticed that there is an automatic Guid column in the table and thuis in the collection. In my case it is called cra27_diereventid. The Table is DierEvent. The Gallery is GalleryDierEvent


So if I do:



I get to the record and can do anything I like with it.


But at one point connection between gallery Item and record seemed lost and things stopped functioning.

I discovered that the line above had automatically changed to


Which does NOT function. No errors but no go.

Does this mean that everytime I publish my app from now I have to check if this line has not been "improved"?

Solution Sage
Solution Sage

Check if this helps:


LookUp(DierEvent, cra27_diereventid=GalleryDierEvent.Selected.cra27_diereventid)

I don't think using a ';' works there.

@SkiDKthis is due to the language of the Browser/Office, Dutch for example will use semicolons (;) instead of commas (,) ... This has not been an issue for me in the past.

Community Support
Community Support

Hi @HansHeintz ,

Is the cra27_diereventid a Unique Identifier type column in your DierEvent Entity?

Have you turn on the "Relational data, option sets, and other new features for CDS" functionality within the Advanced settings of App settings of your app?


Actually, the DierEvent is the Display name of the cra27_diereventid column (logical name) in your CDS Entity. Currently, when use column value of data source within an app, it would use the Display name rather than logical name as referenced column in default.

Please check and see if the following blog would help in your scenario:


Based on the formula that you provided, I think it should work as expected. Please make sure you have turned on the "Relational data, option sets, and other new features for CDS" functionality within the Advanced settings of App settings of your app.

Also please make sure the DierEvent is the Unique Identifier column/Primary Column in your CDS Entity. On your side, you could type the following formula:


then all available column names (Display name) would be shown up as below:2.JPG

Note: The Unqiue Identifier column/Primary Column has same name as your CDS Entity. The screenshot as below:3.JPG


Please consider take a try to re-create a new app based on your CDS Entity, then try the following formula:

LookUp(DierEvent; DierEvent = GalleryDierEvent.Selected.DierEvent)


set the Text proeprty of a Label to following:

LookUp(DierEvent; DierEvent = GalleryDierEvent.Selected.DierEvent, 'Primary Name')

then check if the issue is solved.


Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,200)