Hi,
I have below rule which gives output for distinct values only, but I want get output for indistinct values also.
For Ex: If I give rule input for groupId_int as {496,496,498} , I should get output for all 3 values though it repeats for 496 two times. But here I'm getting only for 2 items as below screen shot.
Can anyone please help me how to approach
index( a!queryEntity_22r2( entity: cons!RGRACSLBL_ENTITY_APPIAN_GROUPS, query: a!query( logicalExpression: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: "Id_int", operator: "in", value: ri!groupId_int, applyWhen: not( rule!APN_isBlank( ri!groupId_int ) ) ), a!queryFilter( field: "groupName_txt", operator: "in", value: ri!groupName_txt, applyWhen: not( rule!APN_isBlank( ri!groupName_txt ) ) ) } ), pagingInfo: a!pagingInfo( startIndex: 1, batchSize: - 1 ) ) ), "data", {} )
Discussion posts and replies are publicly visible
use a!for each in query filter group_Id. so query will execute each iteration.
Doing a query in a foreach is a bad practice in terms of performance and memory consumption.
But, you could fetch the distinct items first, and then use a foreach on the incoming IDs to return the corresponding items.