How to skip last child using Find Children activity?

Hello all,

I have a table where I need to skip first and last child from find children elements.
I use array.Skip(1) method to skip first child, but how could I skip the last one?

Thanks in advance!

@bp777

                           array.Skip(array.Count-1)
2 Likes

Great!

I have one more question - since I use For Each activity to loop through find children elements, how should I set Values within For Each activity?
I tried array.Skip(1, array.Count-1), but that doesn’t work :confused:

Thanks @lakshman :pray:

1 Like

@bp777
its a typical skip take case

array.Skip(1).Take(array.Count-2) optional use a toArray afterwards

3 Likes

Thanks @ppr!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.