switch(dialogid) // Lookup the dialogid{ case 1: { if(response) { switch(listitem) // This is far more efficient than using an if-elseif-else structure { case 0: // Listitems start with 0, not 1