How to create an NSQL Portlet to have a Boolean Filter field

Document ID : KB000027059
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:
I am trying to create a portlet where we need to have one of the boolean fields in the Filter. However, after writing the NSQL Query, the field data type is numeric. I am able to change it to a lookup but that does not serve the purpose. I want to be able to make it a checkbox in the filter, for Yes and No values.

Solution:  
Instead of using "IMPLIED", use "BOOLEAN" for the datatype in your NSQL statement.
Here is an example of using BOOLEAN data type in the NSQL statement.

SELECT @SELECT:DIM:USER_DEF:IMPLIED:PROJECT:P.ID:PID@,
@SELECT:DIM_PROP:USER_DEF:IMPLIED:PROJECT:P.NAME:PNAME@,
@SELECT:DIM_PROP:USER_DEF:BOOLEAN:PROJECT:ISNULL(O.YES_NO_FLAG,0):PYESNO@
FROM SRM_PROJECTS P,
ODF_CA_PROJECT O
WHERE P.ID=O.ID
AND @FILTER@