Hello Guys,
I have a code which says to filter according to the selected tab as shown in screenshot (Alive projects, Closed Projects, All Projects).
I also want to filter the gallery as per the column names (shown in same screenshot) so at the end of the if function I wrote something highlighted in RED.
When I select any three tabs, the code works fine but when I try to search any column items using SearchBar_2 text input it is not at all working even for single column items search.
DataSource:- Project_Table (Excel)
Solved! Go to Solution.
Hello @iAm_ManCat,
Thankyou so much for your support it worked pretty well 🙂 🙂
I am so happy
Only problem is it is showing delegation error (blue highlight near || (OR) in the code between Len and StartsWith)
Will it be ok ?? my data source has around 80 rows with above mentioned columns in screenshot.
Hi,
It's best to not nest your if statements inside each other, you can add them on as additional 'else if' conditions as I have done below. Additionally, we can include the filtering by textbox by including it with each filter but only searching where the text is more than zero characters (there are minor bugs with IsBlank where it doesnt always detect it as blank)
If(
varAliveP = true && varClosedP = false && varUpcMilP = false,
Filter(
Project_Table,
Alive_Project = "Yes",
//Either there is no text in the searchbox or else we start to filter by the text
(
Len(SearchBar_2.Text)=0
||
StartsWith(Customer,SearchBar_2.Text)
)
),
varAliveP = false && varClosedP = true && varUpcMilP = false,
Filter(
Project_Table,
Alive_Project = "No",
//Either there is no text in the searchbox or else we start to filter by the text
(
Len(SearchBar_2.Text)=0
||
StartsWith(Customer,SearchBar_2.Text)
)
),
varAliveP = false && varClosedP = false && varUpcMilP = true,
Filter(
Project_Table,
//Either there is no text in the searchbox or else we start to filter by the text
(
Len(SearchBar_2.Text)=0
||
StartsWith(Customer,SearchBar_2.Text)
)
),
//Catch-all where none of the above conditionsis true and we only filter by searched text if it exists
Filter(
Project_Table,
//Either there is no text in the searchbox or else we start to filter by the text
(
Len(SearchBar_2.Text)=0
||
StartsWith(Customer,SearchBar_2.Text)
)
)
)
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Hello @iAm_ManCat,
Thankyou so much for your support it worked pretty well 🙂 🙂
I am so happy
Only problem is it is showing delegation error (blue highlight near || (OR) in the code between Len and StartsWith)
Will it be ok ?? my data source has around 80 rows with above mentioned columns in screenshot.
Yes the default delegable limit is 500 and you can increase this in the App settings to 2000, so your 80 rows falls far underneath the limit
@iAm_ManCat |
Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you! |
Thanks! |
Thank you
User | Count |
---|---|
150 | |
100 | |
89 | |
78 | |
58 |
User | Count |
---|---|
194 | |
186 | |
106 | |
99 | |
91 |