Hi@Elitezone,
Based on the needs you mentioned, you could try the following formula I provided before.
Do you want to click a button twice to trigger and cancel triggering? If you want to click a button to filter dynamically, you could not achieve this currently in PowerApps. You should need several Buttons as many as your filter types. For example, if you want to filter based on user and date, you should need 2 Buttons.
1. Button that would filter only requests made by me
Set the OnVisible property of the current screen as below:
ClearCollect(Colwork,IdeaBox_1)
Set the Items property of the DataTable as below:
Sort(Colwork;Date;If(SortDescending2;Descending;Ascending))
Add a Button and set the OnSelect property to filter only requests made by yourself as below:
ClearCollect(Colwork,Filter(IdeaBox_1,Person.DisplayName=User().FullName))
Note: The above formula helps you filter the requests made by the current user who is yourself.
2. Button that would filter only requests made in X days (could work the same as input field data)
Add a Button and set the OnSelect property as below:
ClearCollect(Colwork,Filter(Colwork,Date>=Today()-Value(TextInput1.Text) &&Date<=Today()))
Note: The above formula helps you filter the date based on the input data within the TextInput. If you want to filter the records in 3 days, you could enter 3 within the TextInput.
3. As the 'Name' and 'Description' filtering based on the TextInput entry, I think adding a single button to filter could work.
Add a Button and set the OnSelect property as below:
ClearCollect(Colwork,Search(Colwork,TextInput1.Text,"Description","Name"))
4.In order to filter the DataTable correctly every click, I add a Button and set the OnSelect property to recover the collection:
ClearCollect(Colwork,Test0916)
Note: The above formula helps you to recover the DataTable after every click.
Best Regards,
Qi