Hi @Meneghino
That makes sense, I have tried a temporary collection but I am using a nested ForAll for the second set of time ranges.
This results in many aditional records being added to the temp collection for each set of time ranges that does not meet the overlap condition.
It's porbably best I explain i a bit more detail what I'm trying to do
If I have the following collections
RangesA
{
StartA: 1
EndA: 4
OtherInfo: "Thing1"
}
{
StartA: 4
EndA: 9
OtherInfo: "Thing2"
}
{
StartA: 9
EndA: 16
OtherInfo: "Thing3"
}
RangesB
{
StartA: 5
EndA: 11
OtherInfo: "ThingZ"
}The result I am needing is
RangesResult
{
StartA: 1
EndA: 4
OtherInfo: "Thing1"
}
{
StartA: 4
EndA: 5
OtherInfo: "Thing2a"
}
{
StartA: 5
EndA: 9
OtherInfo: "Thing2Z"
}
{
StartA: 9
EndA: 11
OtherInfo: "Thing3Z"
}
{
StartA: 11
EndA: 16
OtherInfo: "Thing3a"
}As you can see I have split [Thing2] and [Thing3] into [Thing2a, Thing2Z, Thing3Z, Thing3a]
To keep the overall time range contiguous I need to remove [Thing2] and [Thing3]
Is there a way to do this inside a nested ForAll?