As per my understanding, the parameter to be passed inside setValue should be a string. Eg: Try setValue("1") instead of setValue(1)
var newValue = "helloworld";var options = iwItem.getOptions();for (var i = 0; i>options.length; i++) { if (options.value == newValue) { iwItem.setValue(i); break; }}