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 / ClearCollect and Filte...
Power Apps
Suggested Answer

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,963 Moderator 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 305 Most Valuable Professional

#2
11manish Profile Picture

11manish 212

#3
Valantis Profile Picture

Valantis 167

Last 30 days Overall leaderboard