Hi,
I have CDT-1 (Address) & CDT-2 (State). I have created a expression rule to query data. Within query filter when I am trying to filter records based on "city" which is in "state" CDT, I am getting this error below:
Expression evaluation error [evaluation ID = 0HJYCTXD] in rule 'rwm_activity_rule' (called by rule 'rwm_activity') at function a!queryEntity: Cannot filter by field [affectedElements.siteid] because it is a complex, multiple, or child of a multiple data type
filter by "personName" is working fine. Please help filter records by city (with in state CDT).
SAIL:
a!queryEntity( entity: cons!Address, query: a!query( logicalexpression: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: "personName", operator: "in", value:ri!personName ), a!queryFilter( field: "state.city", operator: "in", value:ri!city ) }, ignoreFiltersWithEmptyValues: true ), selection: a!querySelection( columns: { a!forEach( { "personName", "state" }, a!queryColumn(field: fv!item) ) } ), pagingInfo: a!pagingInfo( startIndex: 1, batchSize: -1 ) ), fetchTotalCount: false ).data
Discussion posts and replies are publicly visible
Can you clarify what your data structure looks like? There are a few different reasons this might happen, and there are slightly different ways of resolving this depending on how your data is set up.
The error you received is happening due to one of 3 reasons:
The last comment I have - it seems a bit odd to me to have city nested inside of state. I usually try to use M:1 relationships instead of 1:M relationships. So in this case, you cold set it up as City M:1 State and likely have more luck with this filter.