How to remove duplicates created from if statements being false

Hello everyone. I’m in the process of creating digital twins and running into a problem. This is what I’ve done until now:

  1. Started by selecting the pretended element;
  2. Got the family, the family type and then all the instances;
  3. Got the expiry dates as strings, split them and turn them into dates;
  4. With the time span difference node got the days between today and the expiry date and turned that into an integer;
  5. Then I wrote a condition that if the result obtained in point 4 was lesser than 51 or null, it would return 404. If it wasnt it would return 1. Both 404 and 1 are used as numbers and not strings;
  6. After that the goal is to get all the 404 and get their number id so it can be replaced. So I wrote another condition that goes: if it is 404 display number id, if not " ";

In this case, 4 of the extinguishers are expired. So I’d expect a list with 76 ones and 4 number id’s.
But, for each of the expired ones, it’s duplicating every single one of its family instances.
I end up getting one with 396 entries. Its doing 80*4+(80-4).
Can anyone understand why and how to fix it? Please and thank you

Hi @RV_13, welcome on board!

For each true in the if node it will provide the entire list → 4 * 80 true responses plus the 76 false responses.

Try with a List.FilterByBoolMask

1 Like

Thank you.