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 / Starts with formula
Power Apps
Answered

Starts with formula

(0) ShareShare
ReportReport
Posted on by 10

Need help with a formula to help put a default into a drop-down by the first few numbers of a text input. We have hundreds of thousands of barcodes but only a few separate products so having a list to lookup each individual barcode is a lot of work.

 

1 product starts with for example 2151106

Another product starts with 2171106

 

I would like it so if someone inputs a barcode into a text input like 21511061239876 it will automatically put Product A into drop-down by starting with 2151106 or if they put 21711065467890 is will put Product B because it started with 2171106.

 

Hopefully this makes sense. As I can not get any kind of formula to work correctly. Thanks

 

Hopefully this is poss

Categories:
  • Gochix Profile Picture
    1,937 Moderator on at

    In your dropdown Item option use:

    Filter(NameOfYourCollection, StartsWith(YourBarcodeColum, TextInput.Text))

    Then select Advanced options and set the DATA value to the product column.

    Gochix_1-1711728833938.png

     

  • Dannyw10 Profile Picture
    10 on at

    Thanks for your reply. The barcode they scan into the text input is scanned by a Bluetooth scanner so when the numbers go past the first 7 numbers that define that Product it doesn't filter anything anymore. If Product A is 217110698765 i can manually type 2171106 and it filters correctly by filtering Product A but soon as anymore numbers are added after the 6 it produces nothing. If possible I would like it so any products that start with 2171106 it will always assign Product A even if there are numbers after it. 

  • Verified answer
    Gochix Profile Picture
    1,937 Moderator on at

    Ah I see. Then you can do something like:

    If(Left(TextInput.Text,7)="2151106",{Value:"Product A"},{Value:"Product B"})

     


    _____________________________________________________________________________________
    Please give a thumbs up if I resolved your issue! Please click Accept as Solution to close the topic!

     

  • Dannyw10 Profile Picture
    10 on at

    Thanks so much. So simple but as an amateur this was not something I'd have come up with. Would buy you a drink if I could!

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
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard