web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Starts with formula
Power Apps
Unanswered

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:
I have the same question (0)
  • Gochix Profile Picture
    1,935 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,935 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard