Global Filter Setting

I have global filters set:


However, when I attempt to check the filter via the following script it returns a "false" indicator:

var filterSet = DOpus.filters.enable;
	var globalFilterFlag 
	
	if (filterSet === "True")
	{
		globalFilterFlag = "True"
	} else
	{
		globalFilterFlag = "False"
	}		

I would expect since the global filter box is checked that the filterSet would return "True". Is this not the case? If not, how do I get the proper indicator via script?

As always, thanks in advance!

In JScript true and false are boolean constants, they're not strings.

1 Like

@Jon Thanks for clarifying. Tracked down the appropriate way to check:

filterSet == true

Thanks!

You can also do if (filterSet) { ... }

Thanks Jon!