Hello, PA Gurus
I'm sure there is a simple answer to this, but I have not been able to figure it out...
I have a gallery with a 2 column table for the data source: 'PartNumber' & 'PartDescription'
(Table schema):
tblMaterialList = Table(
{
'PartNumber':"",
'PartDescription':"Consumables"
},
{
'PartNumber':"1210112",
'PartDescription':"Connector Male 3/4"" Tube x 3/4"""
},
{
'PartNumber':"1210116",
'PartDescription':"Connector Male 3/4"" Tube x 1"""
},
I am trying to filter / search the table by PartNumber or PartDescription with the following formula on the gallery Items:
Filter(tblMaterialList, txt_FieldTickets_MaterialSearch.Text in 'PartNumber' || txt_FieldTickets_MaterialSearch.Text in 'PartDescription')
The result works up to 3 characters in the text box and then nothing returns (if I type 600112 the gallery is empty):
What am I missing here?
Thanks in advance!
Niceee good to hear that it worked 🙂
Happy coding.
-----------------------
PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]
I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻
@SpongYe so it turns out the filter and gallery were working fine... The issue was the dynamic height of the gallery, I have a formula that adjusts the height of the gallery to match the results from the filter and it was only accounting for the PartsDescription filter...
DOH!!!
Appreciate the second set of eyes @SpongYe
Yes, I agree... I just tested with a blank gallery.
This control is inside a component and using a flexible height gallery. I feel like there are PowerApp Gremlins affecting this for sure...
Will probably try rebuilding the gallery from scratch and see if that "fixes" the issue...
Thanks for your help, I'll report back what my result is...
Hi @LeeEPMTS
For me it's a little dfiferent:
ThisItem.PartNumber & " - " & ThisItem.PartDescription
I don't think this had anything to do with the filtering.
-----------------------
PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]
I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻
That is strange indeed @SpongYe
It makes me feel somewhat better though, as I was sure my syntax was correct...
Can you try putting the PartNumber inside the same text box as the PartDescription please?
That is what I am currently doing on a button control in my design:
$"{ThisItem.PartNumber} - {ThisItem.PartDescription}"
I am curious if that is what is causing my issues?
Hi @LeeEPMTS
Your use case worked for me:
ClearCollect(
tblMaterialList,
{
'PartNumber':"",
'PartDescription':"Consumables"
},
{
'PartNumber':"1210112",
'PartDescription':"Connector Male 3/4"" Tube x 3/4"""
},
{
'PartNumber':"1210116",
'PartDescription':"Connector Male 3/4"" Tube x 1"""
}
)
Gallery1.Items:
Filter(
tblMaterialList,
txt_FieldTickets_MaterialSearch.Text in PartNumber || txt_FieldTickets_MaterialSearch.Text in PartDescription
)
Results:
-----------------------
PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]
I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻
WarrenBelz
146,605
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,946
Most Valuable Professional