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 / Display label if input...
Power Apps
Answered

Display label if input text does not exist in collection ID

(0) ShareShare
ReportReport
Posted on by 42

Hello,

 

I am trying to display a message if the input text from a usb barcode scanner does not exist in a certain field in a collection. I have the message displayed to let the user know to click the barcode input and scan, but I would like the bottom picture(red message) to display if they scan a piece that does not belong to the unique ship ID order. Is this possible to only display if it does not exist for the ship id?

 

See pics below.

 

Thanks!

Powerapps2.PNG
Powerapps3.PNG
Powerapps1.PNG
Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Pseifert 

    Set the Visible property of the label to the formula that would return a true or false condition.

    Example:

       Visible :   (IsBlank(Lookup(yourCollection, yourCertainField=yourBarCode).ID))

     

    This formula would evaluate to true if there is no matching lookup (i.e. ID is blank).

    Since it would evaluate to true, that would make the Visible property true and thus the label would be displayed.

     

    Hope this helps some.

     

  • Pseifert Profile Picture
    42 on at

    @RandyHayes 

    No luck :/.

     

    So I have a gallery that you select the item from that determines the ship id. I would need this to lookup based on colorders where Gallery3.Selected.ShipID=ShipID. it does not seem to be looking at the whole ship id overall for some reason, but only if the value exists or is visible in the current gallery. Once an order has been filled ie the Order QTY = Filled qty, the record is hidden from the gallery.

     

    Any ideas?

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Pseifert 

    Perhaps share some of the formulas you are using on the visible property now and the condition you are expecting (based on field values).

    I'm not entirely sure based on your description when and when not the label should be visible.

    Are you saying the you want to look up the item in the current gallery of order items?

    If that's the case, you might want to do your lookup then on the Gallery3.AllItems property.

    Visible :   (IsBlank(Lookup(Gallery3.AllItems, yourCertainField=yourBarCode).ID))

     

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Pseifert ,

    Could you please share a bit more about the collection that you mentioned?

    Could you please show more details about your scenario?

     

    If you want to display a message when the Input Text value is not existed within a certain field of your Collection, please take a try with the following workaround:

    Set the Visible property of the Label to following:

    If(
    Not(TextInput.Text in YourCollection.FieldName), /* <-- YourCollection represents your collction. The FieldName represents a certain field in your collection */
    true,
    false
    )

    Best regards,

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Pseifert 

    Any luck on this?  Don't get confused by @v-xida-msft 's post - we already covered that in the first response.

    If I understood your last post, you wanted to Lookup/Filter the order information into your Gallery and then verify the scan code against the items in that Gallery.  

    If that was the case, then look back at my last post - that formula is worth a try.

    If you want to do a little shortening of it similar to @v-xida-msft 's post, you could go with:

       !(yourBarCode in Gallery3.AllItems.yourCertainFieldForCodes)

    Post back and let us know if this solved your problem and feel free to mark the post as accepted.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard