I have powerapps gallery with SharePoint as the datasource. My search is working fine as per the below code. I have 2 search boxes in different screens (Landing Page, Items Page).
When user search from landing page, it redirects to Items page which has gallery and shows up the search results properly.
Landing Page SearchIcon OnSelect
Navigate('Items Screen',ScreenTransition.None)
When user search from Items page, it stays on same page which has gallery and shows up the search results properly.
Search Results Gallery Items Property
If(
myfavselected,
Filter(
Items,
ID in Filter(
Favorites,
Title = User().Email
).CatalogID
),
Filter(
Items,
(Len(TextInputCanvas1_3.Value) = 0 || TextInputCanvas1_3.Value in 'Item Name' || TextInputCanvas1_3.Value in Description || TextInputCanvas1_3.Value in Text('Unit Price(USD)') || TextInputCanvas1_3.Value in 'Item Category')||
(Len(TextInputCanvas1.Value) = 0 || TextInputCanvas1.Value in 'Item Name' || TextInputCanvas1.Value in Description || TextInputCanvas1.Value in Text('Unit Price(USD)') || TextInputCanvas1.Value in 'Item Category') &&
((CountRows(colSelectionGal) = 1 || 'Item Category' in colSelectionGal.Value)) &&
(IsBlank(ComboBox3.SelectedItems) || ("Under $50" in Concat(
ComboBox3.SelectedItems,
Value
) && Amount >= 1 && Amount < 50) Or ("$50 - $100" in Concat(
ComboBox3.SelectedItems,
Value
) && Amount >= 50 && Amount < 100) Or ("$100 - $200" in Concat(
ComboBox3.SelectedItems,
Value
) && Amount >= 100 && Amount < 200) Or ("Above $200" in Concat(
ComboBox3.SelectedItems,
Value
) && Amount >= 200))
)
)
Items Page Searchbox Default Value
If(Len(TextInputCanvas1.Value)>0,TextInputCanvas1.Value)
May i know how to reset the TextInput boxes properly in this scenario? When i navigate between screens, the search TextInput value should reset properly. Currently it doesnt.
Hence when i search from Landing page, it redirects to Items page and search results are accurate.
However if i search from Items page, it combines the Landing page keyword and Items page keyword and the search results are inaccurate.
Any advice how to avoid this?