Interactive tables and empty filter conditions?

Hi there,
I’m a bit confused and need some advice.

I have an interactive table with orders and the filter conditions:
ID starts with {s_Order}
ORDER equal to [s_Order}

As long as {s_Order} is empty no table records should be displayed.

How to realize this?

Chris

Hi Chris -

One thought here, you could set your [s_Order] variable to have a default value that will not match anything in the table. Then when the step is loaded, the table will load with no records displayed.


Then when I remove the text (note I am using a “contains” filter instead of equals), my table updates

I also remember having a conversation with @jmlowden about this a while back, and I seem to remember he found a different method to accomplish this but I can’t quite remember exactly what is was! But maybe he can chime in here too :slight_smile:

Thanks Beth for your thought,

because the {s_Order} variable is also used at several places to provide the user with this Order number, I found another solution:
I add an additional filter with a helper variable {s_Empty}. If the variable {s_Order} is empty I set the helper variable to a never existing value (“__empty”}, otherwise to the value of {s_Order}.
It works but maybe not the smartest way.

Chris

2 Likes

For my case I was trying to ensure that a table record placeholder selection was reset and and interactive table results “cleared” when changes were made to the filtering inputs, wherein the user is entering the filtering information to narrow down results in an interactive table, and then selection of a record from that table loads the Record History widget.

I created a variable with a default value that would never coincide with actual table results, effectively blanking the table:

image

I also added triggers to set this default value whenever the OPtimize ID filter was populated and the “Enter” button pressed:

image

And to clear this Nonsense Filter variable when the second filter was populated (and restore it to the default value whenever the second filter is cleared):

image


1 Like