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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / ClearCollect and Filte...
Power Apps
Unanswered

ClearCollect and Filter from a lookup column from Dataverse and Selected Gallery

(1) ShareShare
ReportReport
Posted on by 6
Hello, so I have this code here which gives me incompatible types for comparison. 
 
I wonder if there's a way to convert the type to match the text in the gallery selected.
 
 
ClearCollect(
    Project_Collection,
    Filter(
        'Projects Hazard Assessments',
        Project_Lookup = Information_Gallery.Selected.Value
    )
)
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,351 Super User 2025 Season 2 on at
    Hi
     

    What it the Column Type and what field type is it bound too in your Gallery. Did you Type Value, or was it the only property on the .Selected?
     
    So, atm no idea if it can be converted because I dont know what it is. So not sure what to convert it to.
  • Paul DC Profile Picture
    6 on at
    Hi @FLMike
     
    Project Lookup is a LookUp column in Dataverse.
     
    Column type is just a text field. All I have for now were just simple text fields.
     
    I somehow made it work with this code:
     
    ClearCollect(
        ProjectCollection,
        'Projects Hazard Assessments',
        Filter(
            'Projects Hazard Assessments',
            Project_Lookup.'Project Title' = Information_Gallery.Selected.'Project Title'
        )
    )
     
    What concerns me now is whenever I select a gallery it shows up the data on my table with 2 rows of text fields.
    And what I wanted to happen is to appear the first row of fields and able to input the Hazard Assessment
    because on this scenario I just inputted the data through my table.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard