It is clear to set only 1 criteria for DSRequest using setCriteria(field, value).
However I can't seem to find a way to set 2 criterias in ds.xml. I have tried Map with no success. Here is my code.
Please anybody let me know where I am wrong...
----
<script language="groovy">
if (dsRequest.getOperationType() == Datasource.OP_ADD ) {
DSRequest dsReq_languages = new DSRequest("s110_languages","fetch");
dsReq_languages.setOperationId("LanguagesNotRegistered");
dsReq_languages.setRPCManager(dsRequest.getRPCManager());
Map<String,String> map = new HashMap<String,String>();
map.put("screen_code",dsRequst.getFieldValue("screen_code").toString());
map.put("language_key",dsRequst.getFieldValue("language_key").toString());
dsReq_languages.setCriteria(map);
DSResponse dsRes_languages = dsReq_languages.execute();
}else if (dsRequest.getOperationType() == Datasource.OP_REMOVE) {
}
return dsRequest.execute();
</script>
However I can't seem to find a way to set 2 criterias in ds.xml. I have tried Map with no success. Here is my code.
Please anybody let me know where I am wrong...
----
<script language="groovy">
if (dsRequest.getOperationType() == Datasource.OP_ADD ) {
DSRequest dsReq_languages = new DSRequest("s110_languages","fetch");
dsReq_languages.setOperationId("LanguagesNotRegistered");
dsReq_languages.setRPCManager(dsRequest.getRPCManager());
Map<String,String> map = new HashMap<String,String>();
map.put("screen_code",dsRequst.getFieldValue("screen_code").toString());
map.put("language_key",dsRequst.getFieldValue("language_key").toString());
dsReq_languages.setCriteria(map);
DSResponse dsRes_languages = dsReq_languages.execute();
}else if (dsRequest.getOperationType() == Datasource.OP_REMOVE) {
}
return dsRequest.execute();
</script>
Comment