When scroller, global variable changing

when I scroller my list, item code variable changing every time . I want get my last item code from google sheet. this is my google sheet
GS

If you don’t want the variable to change its value, you can simply remove “set global ITEMCODE” block in “RecyclerList1.OnBindView” event.

If you want to select the last item from a list, you can use “select list item” block with list length as index. You can also reverse the list and select the first item.

1 Like

please see the video after scroll what happen

If you don’t want the variable to change its value, you can simply remove “set global ITEMCODE” block in “RecyclerList1.OnBindView” event.

I know that. but I want fixed variable as last category code then I can make next category code.
how can I get my last category code ?

Every time you make a change in gsheet add/edit/delete then you have to call data again in order to refresh recyclerlist

I did. see the video. when I added new category, item list refresh and showed new category. but the problem is if I scroll my list and add new category, category code get wrong.

clock

Never used that extension. I’m creating a guide on add/edit/update gsheet using 🟩 [FREE] Google Sheets for AppInventor (replicant) using Google Apps Script - Extensions - MIT App Inventor Community and I don’t face such issues.
I will post it in community later today or tommorow

I think that extension work perfect. but I couldn’t get category code for variable because I don’t know hot to do that. I will try follow your guide.

:green_square: [FREE] Google Sheets for AppInventor (replicant) using Google Apps Script - Extensions - MIT App Inventor Community