Hey @Kumar9024021
Based on two threads posted by you, I have got a basic understanding of what you are trying to do.
https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Search-combined-with-multiple-fields-OnClick-of-Search-button/td-p/414465
https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Search-between-dates-Powerapps/td-p/414456
In case you want to filter the data only when the Search button is clicked, you can set the configuration as:
Button ->
UpdateContext({searchTerm:TextInput1.Text, searchEventOrganiser: TextInput2.Text, searchSubmittedBy: TextInput3.Text, searchStatus: TextInput4.Text, EventFrom: DatePicker1.SelectedDate, EventTo: DatePicker2.SelectedDate, searchEventLocation: TextInput5.Text })
This sets variable for all the input controls, these can be used to only update the gallery when the button is clicked.
Using Button.Pressed, is not the right way to track the click of a button control. It only returns true when the button is pressed and it will return to false as soon as you release the button.
Gallery ->
Filter(DataSourceName, StartsWith(Event,searchTerm) && StartsWith(Organiser: searchEventOrganiser) && StartsWith('Submitted By', searchSubmittedBy) && StartsWith(Status,searchStatus) && StartsWith(EventLocation, searchEventLocation) && EventDate > EventFrom && EventDate < EventTo)
This should give you the desired results. Note: Here, I have used AND(&&) condition between the logic. In case you want to apply an OR(||) condition, please replace the symbol accordingly.
If this differs, please share more details about the scenario that you are trying to build.
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!