AHD03053:Bad where clause: (Attr not found or not atomic)

Document ID : KB000107968
Last Modified Date : 26/07/2018
Show Technical Document Details
Issue:

Lookup field in catalog is not working correctly.
in  Service Catalog a service that contain a lookup field that search into the mdb for all the CI's that are from the X family.

This has a name of the X (resource_name) and use the "Select object" operator for SDM on PAM. 

set the object "Asset" and the where clause = "resource_name ='"+ Process.SCATM + "' and inactive =0".
When  trying to get this working the following error appear in the operator:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body><soapenv:Fault>
<faultcode>soapenv:Client</faultcode>
<faultstring>Error fetching: AHD03053:Bad where clause: Parse error at : "resource_name ='"+ Process.SCATM + "' and inactive =0" (Attr not found or not atomic)</faultstring><faultactor/><detail><ErrorMessage>Error fetching: AHD03053:Bad where clause: Parse error at : "resource_name ='XXXXX'" (Attr not found or not atomic)</ErrorMessage>
<ErrorCode>103</ErrorCode>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

Environment:
SDM (Service Desk Manager) 14.1.05
Service Catalog 14.1.05
IT PAM (Process Automation) 4.3.02
Cause:
SDM work at object level and the clause has been configured with WHERE. This type of clause will work on Database query but not at object level.
Resolution:
Run a bop_sinfo -d nr and confirm objects that are included in the operator exist at the object level.

In this issue field above we use "resource_name and inactive", which don't exist at object level (Exists at database level)

Instead of:
object "Asset" and the where clause = "resource_name ='"+ Process.SCATM + "' and inactive =0"

Configure to the following to use object attributes:
object "Asset" and the where clause = "name ='"+ Process.SCATM + "' and delete_flag= 0"
Additional Information:
How where Clauses works:
https://docops.ca.com/ca-service-management/14-1/en/reference/ca-service-desk-manager-reference-commands/technical-reference/where-clauses