Error using While loop. Assign: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

@Khadija_Zeb,

Try logging the array values before While loop using this expression in Log Message activity.

String.Join(",",divisionNames)

I suspect the array have some less or no items.