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..




ADF : ViewCriteria: ViewCrietiria applied on ViewLink of ApplicationModule



ViewCrietiria applied on ViewLink of ApplicationModule and dragged as Tree on UI.



Hi All,

I have View Link , for child ViewCritiria is applied.

Eg : DeprtmentVO
|_
EmployeeVO (Applied ViewCritiria)

I am using this view link as Tree table on my UI (The ViewCritiria is not working on child)

but if i use the same link as maste detail table (View Critiria will work on table).

Attached are the 2 files
1. How i am applying ViewCritiria on child
2. How VC is working for Table, and not working for Tree.
------------In VOImpl -> we have to override the below function------------------------------
@Override
public void prepareRowSetForQuery(ViewRowSetImpl vrs, Row[] rows)
{
Boolean isMktImpChildInstance = false;
String viewInstanceName = this.getViewObject().getName();
//isParent checks if the VO is used for fetching only the root territories
isMktImpChildInstance = ("DepartmentROVO_EmployeeROVO_Dept_Empl_Link_EmployeeROVO".equals(viewInstanceName));
//If the logged in user is enterprise admin, fetch only the global territory
if (isMktImpChildInstance)
{
ViewCriteria vc1 = this.getViewCriteria("EmployeeIDROVOCriteria");
vc1.setUseBindVarsForLiterals(false);
this.applyViewCriteria(vc1, true);
}
super.prepareRowSetForQuery(vrs,rows);
}

ADF : Groovy: How to use Groovy Expression for ViewObject -> BindVariable

--------------------------------------In My VOImpl-------------------------------------------------------

import oracle.apps.fnd.applcore.common.ApplSessionUtil;

public String getLoggedInUser(){
String loggedInuser = "";
if(ApplSessionUtil != null){
loggedInuser = ApplSessionUtil.getUserName();
}
return loggedInuser;
}
----------------------------------In VO.xml -> For Bind Variable -> Expression-------------------------

adf.object.viewObject.loggedInUser