Is there a smart way of grouping Exchange Items used in several outgoing and incoming functional exchanges allocated to a function?
Let’s say I have a function with 3 incoming and 3 outgoing exchanges, but in total, only 4 different exchange items are exchanged. I want to build a table that shows name and description of these exchange items but without duplication.
In regular coding I would use a for example a dictionary variable to collect and filter all exchange items associated with a function, but I don’t think M2Doc can do this, right?
Does anyone have another smart idea how to avoid duplication while looping?
Thanks for the quick feedback! That sounds like it could go in the right direction… but how to I proceed if I have to “merge” two sequences? For example
for outgoing_exchange | func.outgoing
for exchanged_item | outgoing_exchange.exchangedItems
exchanged_item.name # Table stuff
for incoming_exchange | func.incoming
for exchanged_item | incoming_exchange.exchangedItems
exchanged_item.name # Table stuff
The challenge I see here is that the elements I want to filter are nested, so I do not have one sequence but multiple that I first have to merge and then filter by asOrderedSet().