How to Filter some records in one aggregate by another records list

Hi,

Can any body please help on regarding below:

I am trying to remove  some records(rows) in records list (from server aggregate) which records match with another records list(from local aggregate).

EX: A = record List from server aggregate.

B=record List from Local aggregate.

I need  A-B

Thank You.


Hi Pranab,

You need to create logic for that where you iterate list A and for each iteration iterate list B and check for each B element if it is equal to current A. Store the Ids that you identify to remove and after finishing iterations use ListRemove to remove the elements you want.

Here is a draft of a possible implementation:

Hope this helps.

Ana Reis

You can also do an advanced query instead of an aggregate, to which you pass a string containing the list of id's of elements in group B, and use the NOT IN operator in the WHERe clause. so something like:


select *

from A

where A.id NOT IN stringlist-of-B-Id's

Ana Reis wrote:

Hi Pranab,

You need to create logic for that where you iterate list A and for each iteration iterate list B and check for each B element if it is equal to current A. Store the Ids that you identify to remove and after finishing iterations use ListRemove to remove the elements you want.

Here is a draft of a possible implementation:

Hope this helps.

Ana Reis

Hi Ana


Getting error while using two iterations 





Nilesh Rokade wrote:


i think the second loop have his "cycle arrow" in the wrong way

Carlos Diogo Lima Gonçalves wrote:

Nilesh Rokade wrote:


i think the second loop have his "cycle arrow" in the wrong way

Can you please share more details on it ? Which direction is wrong by highlighting it. 


here: