Please check the reference: List View filter - #2 by NCP
Also check the documentation for the script.