Wednesday 7 August 2013

UCM : UCM IdcService: GET_SEARCH_RESULTS in binder object can i use ..?

UCM IdcService: GET_SEARCH_RESULTS in binder object can i use <contains>..?

I am querying UCM from java code, below code i am using.

binder.putLocal("IdcService", "GET_SEARCH_RESULTS");

binder.putLocal("QueryText",
"dSecurityGroup <matches> `" + ucmSecurityGroup +"` <AND> <NOT>(xComments <matches> `Processed=YES`)");

we have <matches> in query , |||ly do we have <contains> option...?

############################Solution######################################
From Browser:

We can test by giving different options as shown below.

http://<<Ip address>>:7012/cs/idcplg?IdcService=GET_SEARCH_RESULTS&QueryText=xComments+<substring>+`Processed=YES` -- working (substring is equivalent to "like")

http://<<Ip address>>:7012/cs/idcplg?IdcService=GET_SEARCH_RESULTS&QueryText=xComments+<contains>+`Processed=YES` -- not working

http://<<Ip address>>:7012/cs/idcplg?IdcService=GET_SEARCH_RESULTS&QueryText=xComments+<matches>+`Processed=YES` -- working

Refer - https://blogs.oracle.com/kyle/entry/searching_for_null_values_ucm
From JAVA:
I used code as shown below from java code.

             binder.putLocal("QueryText",
                            "dSecurityGroup <matches> `" + ucmSecurityGroup +"` <AND> dDocAccount <starts> `" +
                            transformedAccount+"` <AND>  ( <NOT>(xComments <substring> `ProcessedBy=`) <OR> xComments <matches> ``) ");

After substituting the value query  becomes:



dDocAccount <matches> `crm$/lead$/import$` <AND> dSecurityGroup <matches> `FAFusionImportExport` <AND>  ( <NOT>(xComments <substring> `ProcessedBy=`) <OR> xComments <matches> ``)
 From UCM Console:

Attached is the query builder where we can test our query is correct or not..




No comments:

Post a Comment