SmartClient_v111p_2017-12-16_PowerEdition
Can i pass in multiple values into the $criteria for a single field to show in the IN clause inside of the whereClause
for example i have the following operationBinding in the ds.xml file:
and this is the JS side
but it seems like the $criteria is expecting a single value since i see it the backend putting single quotes around my array
i couldn't find an example using the whereClause unless i use advancedCriteria but not sure if i can do both at the same time
any suggestions would be appreciated
thanks
Can i pass in multiple values into the $criteria for a single field to show in the IN clause inside of the whereClause
for example i have the following operationBinding in the ds.xml file:
Code:
<operationBindings> <operationBinding operationType="fetch" operationId="getPendingRequests"> <whereClause> Request.CurrentStatusKey != $criteria.CurrentStatusKey #if ($criteria.StatusKeys) AND Request.CurrentStatusKey in ($criteria.StatusKeys) #end #if ($criteria.UserKey) AND Request.requestKey in (SELECT RequestKey FROM cfm.Investigation i JOIN cfm.InvestigationTarget it on i.InvestigationKey = it.InvestigationKey WHERE it.UserKey = $criteria.UserKey) #end </whereClause> <orderClause> CurrentStatusKey </orderClause> </operationBinding> </operationBindings>
Code:
var crit = {CurrentStatusKey:7}; var fetchOperationId = "getPendingRequests"; if (!CRM_REQUEST_MANAGER && FILTER_BY_STATUS) { crit.StatusKeys = Array.from(CURRENT_USER_RIGHTS.values()); if (CRM_INESTIGATION && FILTER_INVESTIGATION_TARGET) { crit.UserKey = userKey; } } Requests.fetchData(crit,null,{operationId:fetchOperationId});
i couldn't find an example using the whereClause unless i use advancedCriteria but not sure if i can do both at the same time
any suggestions would be appreciated
thanks
Comment