Page 1 of 1

How to get the id of the item of a list

Posted: Tue Apr 21, 2015 11:54 pm
by Alan Wong

var clickedItemIndex = $(this).parent().index();
var currentItemArray = Apperyio.storage.item_array.get()[clickedItemIndex];
Apperyio.storage.item.set(currentItemArray);

I used this code to specify which item I am going to see. But I want to keep track of the view count. So every time I click that item, it will increase the view count in the database. This code only has the index, which is 0,1,2,3...in that list, and it is not helpful. I have to know the _id of that row, so that I can do that.

Can someone help me? Thanks!

If you have any idea about how to read and update the view count in the database, that would be great!


How to get the id of the item of a list

Posted: Wed Apr 22, 2015 3:00 pm
by Serhii Kulibaba

Hello Alan,

Please follow tutorial below: https://devcenter.appery.io/documenta...