web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Incompatible Types for...
Power Apps
Answered

Incompatible Types for comparison. These types cant be compared: Control, Number

(0) ShareShare
ReportReport
Posted on by 85

I have a gallery named 'DLCGallery'. When I select an item from the gallery it opens in the 'DLCForm (editmode). This works correctly. I added another gallery to the DLCForm named 'TaskGallery'. The datasorce for taskGallery is named 'Tasks' and it has a lookup field named 'Parent' that points to the ID field of the DLC Site Record datasource that is used by the DLCForm. When I select an item (OnSelect) from the DLCGallery I set a variable named 'varSelectedDLCFormID' to the id of the record I'm getting into 

 

Set(varSelectedDLCFormID, ThisItem.ID)
 
I have verified this works. When I input the following formula into the 'items' property of the Taskgallery I get the error above displayed in the thread subject. I've tried uding various casting techniques, but none seem to work.
 
Filter(Tasks, Parent = varSelectedDLCFormID)
Categories:
I have the same question (0)
  • timl Profile Picture
    36,813 Super User 2026 Season 1 on at

    Hi @ShawnPelletier 

    In your DLCGallery, can you confirm that you haven't named a label/textbox, or some other control with the name ID? If so that's a possible cause of the error since the control name would clash with the data field name.

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @ShawnPelletier,

    SInce Parent is a LookUp field, I think you should modify as:

    Filter(Tasks, Parent.Id = varSelectedDLCFormID)
  • Verified answer
    ShawnPelletier Profile Picture
    85 on at

    I confirmed that it was not using another control with the same name and I also tried the Parent.ID option and neither worked. I ended up creating a text field with a modified but similar name which I will populate with the ID and that worked. Not ideal, but functional.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 762

#2
11manish Profile Picture

11manish 640

#3
Valantis Profile Picture

Valantis 548

Last 30 days Overall leaderboard