Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Incompatible types for comparison (yes another one)

(2) ShareShare
ReportReport
Posted on by 19

It's my first post here, but I do see numerous questions similar to this but have been unable to derive the solution to my case from them.   I'm trying to filter a gallery of Purchase Order Lines for the PO Header in the form above it.    I have set a variable coming to the screen for the PO Number.    My good buddy co-pilot can't figure it out and just alternates between two alternatives.

 

Filter('Purchase Order Line', 'PO Number' = varPONum.'PO Number')
Yields Incompatible type comparison: Record, Text.

OK, so we'll just try the variable with type record:
Filter('Purchase Order Line', 'PO Number' = varPONum)  

But that comes back with Incompatible type comparison: Record, Record.      This one really flummoxes me because... well, if the data type is the same you should be able to compare them, right?


  • KeithAtherton Profile Picture
    3,646 Most Valuable Professional on at
    Re: Incompatible types for comparison (yes another one)

    "Ding ding ding ding ding!", love it! 😁

     

    Great news, well done for getting it working and thanks for the update.


    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Connect with me online.

  • Bandito Profile Picture
    19 on at
    Re: Incompatible types for comparison (yes another one)

    Ding ding ding ding ding!    I think I just copy/pasted it in from your post so I didn't get the context hints.    
    This seems to work:

    Filter('Purchase Order Line', 'PO Number'.value = varPONum.'PO Number')

     

  • Verified answer
    KeithAtherton Profile Picture
    3,646 Most Valuable Professional on at
    Re: Incompatible types for comparison (yes another one)

    What does intellisense display when you type 'PO Number'.?

     

    I'm expecting the record provides a column that can be used.


    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Connect with me online.

  • Bandito Profile Picture
    19 on at
    Re: Incompatible types for comparison (yes another one)

    No, I think I did try that in one of my iterations with the chatbot as well.  🙂     That gives me 'Name isn't valid' (shown below)

    Bandito_0-1720636124582.png

     

  • KeithAtherton Profile Picture
    3,646 Most Valuable Professional on at
    Re: Incompatible types for comparison (yes another one)

    Hi @Bandito,

     

    Does this code work?:

    Filter('Purchase Order Line', 'PO Number'.'PO Number' = varPONum.'PO Number')

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    Connect with me online.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,535 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,908 Most Valuable Professional

Leaderboard