I am trying to change values in a loop under certains conditions, but the value of the selector does not change and remains the default value. What is the easiest way around thi