I have an app connected to a list. I have a select option in my app where I can choose between 5 sec,10 sec and 15 sec and that is a setting when the list should update.If I choose 5 sec the list should update every 5 sec etc. I am not shore how to loop through select options and there must be something wrong in my code . here's my code:

function chooseOpt() {
var lstString="";
var Enum = opt.getEnumerator();
while (Enum.moveNext()) {
    var currentItem = Enum.get_current();
    if (currentItem.get_item("5sec").selected) {
        //do something


1 Answer 1


If you are just reading the value of the choice field, use get_item('ChoiceFieldName'). Pass this value to a switch construct which will have options 5, 10 and 15 and you can build logic for each option.

  • Is there any problem you are facing with this? I see you un-accepted the solution!
    – Vamsi K K
    Commented Sep 15, 2015 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.