Executing dot notation dwcontrol.object.data[n] on the Web produces different results from PowerBuilder.
Solution - use any of the following dot notations as a substitute for dwcontrol.object.data[n]:
dwcontrol.object.data.primary[n]
dwcontrol.object.data.current[n], or
dwcontrol.object.data.primary.current[n]