Need to add filter in queryEntity

Hi ,

I want to add filter condition  from interface to expression rule(Query Entity). In existing scenario on interface i am using below code to display error message .

Now same functionality i want to achieve at query entity filter condition. I want to filter my data at first level only instead to pop error message on interface.

Can you help me to add below condition in query entity. 

Filter Condition which need to be add on Query-

count(
rule!getValidationFilter(
index(
ri!masterDataSet,
"nameID",
{}
)
)
) >= 1

Basically i want to apply above rule in query entity . Master data should be filter out where count is greater then 1 or equal 1.

QUery Entity-

a!queryEntity_18r3(
entity: cons!MASTER_TABLE,
query: a!query(
logicalExpression: a!queryLogicalExpression(
operator: "AND",
filters: {
if(
rule!APN_isBlank(
ri!nameID
),
{},
a!queryFilter(
field: "nameID",
operator: "=",
value: ri!nameID
)
)
}
),
pagingInfo: local!pagingInfo
)
),

  Discussion posts and replies are publicly visible