I tried it with a while loop instead and it worked...
# suitescript
a
I tried it with a while loop instead and it worked. My setSublistValue statements were also outside of my conditionals, it it never set the value