How can I make it that the table is shown fully, so with ALL status or part status selected? Because if I remove the database condition entirely, the table is shown fully. Just not when I want to filter on the status or part status.
If the user doesn’t select anything from the status dropdown lists, you want the second group of conditions in your query to be ignored, so you need to add a condition to this group, eg:
Hi Nevil,
the input above the filter/filters group is a condition field. What it does is:
You enter a dynamic expression as a condition
If the condition is TRUE then the filter(s) will be applied, otherwise - they won’t be applied.
In your case, if you want to activate the filters when a users selects any of the two fields, then your expression will look like:
{{$_GET.part_status || $_GET.status}} - this means if part_status OR status return value, apply the filter(s).
Using a GET/POST variable as acondition like {{$_GET.variable}} checks if the variable returns a value and if it returns a value, the condition is TRUE, otherwise it’s FALSE.
I have entered {{$_GET.part_status || $_GET.status}} in that input field but the table still doesn’t show any data on default. Only if I have clicked both status and part status.
Ah I see, I would have thought that the {{ }} should always be around the variable. This is the only exception then I think?
It does load the table on default now!
The problem now is, I have set the group to OR, but then when I have set both a status and a part status, it doesn’t show the correct data. It does when I have set the group to AND, but then the table is empty when I have only set either status or part status…
The expressions should always be inside the {{ }}: {{var1 > var2}} or {{var1 == var2}} etc…
As for the filters - how are they exactly supposed to work?
When you select status what should happen and then when you select part status what should happen?
In the video I first show the way it should work, and then after how it currently works with our application. Hope this is clearly shown visually in the video.
Can you try to explain how these 4 filters should work - what should trigger when?
But please don’t just move your mouse around in a video - explain it in a post here.
So two separate groups, for each GET filter (status and part status). This way you can put separate condition for each of them. My screenshot is just sample, not using the same as your get var names.