Switch Control - reading static value when unchecked

I’m trying to filter a Data View with a Switch Control. I’m filtering through 9 other fields and this is working fine.

I read numerous community threads and reviewing:

Nothing seems to assist me in addressing this.

Here is my view code:

The database condition is setup like this:

Thanks for the help

Reading static value? You mean, assuming a default value when the checkbox is unchecked?

{{$_GET.inpsoldstatus || "default-value"}}

Thanks for the reply Apple, I’m not sure I understand your statement.
Isn’t the condition in the query looking for a value and should see the static value until it’s checked?
The static value of the checkbox is set to “sold” and the filter uses this immediately instead of when the switch is moved.

Try {{$_GET.soldstatus}} which is the name of the param being sent in the form submission.

Is sold written as “sold” or ‘sold’ ?

The value field itself in the corresponding table field is Text?

As in “sold, not sold” or are you using a boolean 0 or 1 to represent sold or not sold ?

Thank you everyone -

I was loading the static value in server connect input parameters - thus it correctly loaded “sold”, instead of reading the checked status and applying my requested filter there.

dmx-param:inpsoldstatus=“form1.inpsoldstatus.checked.then(‘sold’,’’)”

1 Like