Alan Wong
Posts: 0
Joined: Tue Apr 21, 2015 5:06 pm

How to get the id of the item of a list

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!

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

How to get the id of the item of a list

Hello Alan,

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

Return to “Issues”