Here is my user interface:
I would like the user to be able to start typing a barcode in the text field on the left, and have the databtale filter and return only results which have a barcode matching the text entered into that field.
E.g. the user starts typing 930
and the results in the DataTable change to only list records with a barcode starting with 930.
I have done some reading, but it's not clear to me how to do this, as most filtering examples deal with a gallery. I should point out that the data for the DataTable is collected in a previous screen, and displayed there, as well as this screen. I am happy to do a refresh or a re-collect in this screen if required? Just not sure how to get it working.
Solved! Go to Solution.
Never mind, I figured it out 🙂 For anyone else interested in filtering a Data Table by text entered into a text box!
If( IsEmpty(TextInputFilterBarcode), selectedStoreOutOfStockCollection, Filter( selectedStoreOutOfStockCollection, StartsWith( Text(Barcode), TextInputFilterBarcode.Text ) ) )
I got this to work with the following (yay!)
Filter(selectedStoreOutOfStockCollection,StartsWith(Text(Barcode),TextInputFilterBarcode.Text))
However, I need to ensure that if nothing is entered into the text box, there is no filtering applied. I imagine this would be an IF statement of some kind, but not really sure.
Never mind, I figured it out 🙂 For anyone else interested in filtering a Data Table by text entered into a text box!
If( IsEmpty(TextInputFilterBarcode), selectedStoreOutOfStockCollection, Filter( selectedStoreOutOfStockCollection, StartsWith( Text(Barcode), TextInputFilterBarcode.Text ) ) )
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
180 | |
52 | |
41 | |
38 | |
28 |
User | Count |
---|---|
255 | |
81 | |
71 | |
68 | |
66 |