NSOA.wsapi.disableFilterSet( [ flag] )
Use this function to check, enable, or disable user filter sets.
Scripts are executed within the context of the user who is signed in. This means that the user filter sets for the signed in user will be applied unless disabled.
Disabling user filter sets allows you to write more generic scripts.
Parameters
-
flag {Boolean} [optional] — If true is passed the user filter sets are disabled, if false is passed the user filter sets are enabled, and if no parameter is passed the function returns the current filter setting.
Returns
-
Boolean true if filter sets are disabled and false if user filter sets are enabled.
Units Limit
-
1 unit
For more information, see Scripting Governance.
Since
-
November 16, 2013
Example
-
Disable user filter sets on .wsapi requests.
NSOA.wsapi.disableFilterSet(true);
-
Enable user filterset on .wsapi requests.
NSOA.wsapi.disableFilterSet(false);
Note:This the default OpenAir behavior, that is, user filter sets enabled.
-
Return the Boolean state (without changing setting)
if( NSOA.wsapi.disableFilterSet()) { // The user filter sets are disabled }
See Code Samples for more examples.