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
Example:
a!queryEntity( entity: cons!MASTER_TABLE, fetchtotalcount: true(), query: a!query( logicalExpression: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: "nameID", operator: "=", value: ri!nameID, applywhen: not(rule!APN_isBlank(ri!nameID)) ) } ), pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 0) ) ).totalCount >= 1
I'd also suggest adding information about what you want your outcome to be without discussing a!queryEntity() at all - there's potentially a lot of possibilities with queries, so knowing something like "I'd like to validate that this text field doesn't already have the same value in the database" or whatever your original issue is can help us provide a good solution.