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 issues

(0) ShareShare
ReportReport
Posted on by 102

I am getting Incompatible types for comparison. These types can't be compared: Text, Table. Below is my formula which is in the OnScan property. What I am trying to achieve is if I scan an item and If the barcode of that item exists in the gallery it will open up the item. I want to get this fixed and see if it goes to the gallery item that has the same barcode. I have also changed 

LookUp(
            'Units assigned to Callsigns',
            'Serial Number' = ScanBarcode.Barcodes 
to
 
LookUp(
            'Units assigned to Callsigns',
            'Serial Number' = DataCardValue32.Text
Datacardvalue32 being the value of the scanned barcode but this will take me to the gallery but does not go to the item with the same barcode.

Help, please?

 

If(
    !IsBlank(ScanBarcode.Barcodes),
    Set(
        SelectedItem,
        LookUp(
            'Units assigned to Callsigns',
            'Serial Number' = ScanBarcode.Barcodes
        )
    );
    If(
        !IsBlank(SelectedItem),
        Navigate(
            Form2,  
            ScreenTransition.Cover,
            {
                SelectedItem: SelectedItem
            }
        ),
        Notify("Barcode not found in the gallery.", NotificationType.Error)
    )
)
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,312 Most Valuable Professional on at

    Hi @BianceBee ,

    Try

    LookUp(
     'Units assigned to Callsigns',
     'Serial Number' = First(ScanBarcode.Barcodes).Value
    ) 

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • BianceBee Profile Picture
    102 on at

    Hi Warren,

     

    Thanks for that. Have tried it but it does not go to the item, just opens up the gallery

  • WarrenBelz Profile Picture
    156,312 Most Valuable Professional on at

    Hi @BianceBee .

    I was addressing the compatibility issue in the first post - this should address the second issue

    With(
     {_Barcode: First(ScanBarcode.Barcodes).Value},
     If(
     IsBlank(_Barcode),
     Notify(
     "Barcode not found in the gallery.", 
     NotificationType.Error
     ),
     With(
     {
     _Item:
     LookUp(
     'Units assigned to Callsigns',
     'Serial Number' = _Barcode
     )
     },
     Navigate(
     Form2, 
     ScreenTransition.Cover,
     {SelectedItem: _Item}
     )
     )
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • BianceBee Profile Picture
    102 on at

    Apologies, yes that fixed the compatibility issue. As for the second part have tried it but still only goes to the gallery. I have checked that the properties on the gallery and all seems to be fine. The items property of the gallery has 

    Search([@'Units assigned to Callsigns'], SearchInput1_1.Text,"Title", "Title") for the search function. and below is the data within the gallery BianceBee_1-1705534723980.png

     

     

  • WarrenBelz Profile Picture
    156,312 Most Valuable Professional on at

    Hi @BianceBee 

    You need to navigate to the screen name, not the form name.

  • BianceBee Profile Picture
    102 on at

    Hi @WarrenBelz 

    Thank you for your help. I did do this but still just opens up the screen the gallery is in and does not open the item that has the same serial number. I did notice that when i click on the formula to see if it brings up data and it doesnt. so i checked from the beginning of the formula and can see the 'With' part of the formula has side effects...

    There is a value in the barcode scanner and the value is in the datasource. Not sure if this is why its not working properly

    BianceBee_2-1705543286556.png

     

    BianceBee_1-1705543153556.png

     

    BianceBee_0-1705543109538.png

     

  • WarrenBelz Profile Picture
    156,312 Most Valuable Professional on at

    @BianceBee ,

    The With() statement is doing nothing more than setting a temporary variable with the scanned code. If you put this on a Label and scan a code, do you see the Serial Number of the scanned item ?

    LookUp(
     'Units assigned to Callsigns',
     'Serial Number' = First(ScanBarcode.Barcodes).Value
    ).'Serial Number'

     

  • BianceBee Profile Picture
    102 on at

    @WarrenBelz  

    Yes, i do see it. I already had a label with 

    First(ScanBarcode.Barcodes).Value to show the serial number scanned. Have changed it to the code you stated and it also shows up fine as well. 
    LookUp(
       'Units assigned to Callsigns',
       'Serial Number' = First(ScanBarcode.Barcodes).Value
    ).'Serial Number'
  • WarrenBelz Profile Picture
    156,312 Most Valuable Professional on at

    @BianceBee ,

    There is only one thing left - what is the Item of your Form ?

  • BianceBee Profile Picture
    102 on at
    @WarrenBelz 
    The Item property is set to RecordsGallery1_1
    .Selected so that it shows the details of the selected gallery item. datasource is also Units assigned to callsigns

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard