checks whether an item with the specified ID exists
var id = 3; if(view.exists(id)){ // true or false view.select(id); /* other logic */ }