Table Widget - row "pick" after 100

Using Android app 2.11.10. Love the table widget. Understood that the table is FIFO for 100 lines. The “pick” command for the table widget gives me strange behavior after I reach a rowindex of 100. I have a counter set up showing rowindex, If I manually increment the rowindex, (and thus the counter) with button presses to any number before 100, the last row entered into the table is selected and kept in the bottom of the scroll, as desired. While staying in the Blynk app and in this project, if I turn the phone screen off (short press of the power button), and then turn it back on, the table looks exactly the same and I can continue incrementing and putting phone to sleep - UNTIL I hit 100. After that, when I add a line to the table, and thus increment the rowindex counter, it adds the line to the bottom, highlights it green, etc, all is well. Put the phone to sleep and turn it back on, and the highlighted row jumps back up to row 100 and scrolls that row into view at the top line of the table. I then have to swipe up to get to the bottom of the table to see the latest entry, which of course isn’t highlighted. I’ve tried stopping the rowindex from incrementing once it hits 100, no better. Tried repeating a “pick” on a timer every second, no help. I’ve tried several ways to re-pick the last line entered, but no work around so far. I can do a “clr” when I get to 100 and reset rowindex, but that defeats the purpose of a rolling log…

I use the table in several projects as an activity log. I don’t add lines often, sometimes only once a day, or only when a door opens or a setting changed, but it is important to me when I open the app to see what’s going on, that it shows the last added line in the log… This problem exists in several projects, and I created this one fresh Any ideas? Could be just my particular phone? FWIW, it seems like Blynk app probably “goes to sleep” when the phone screen is off so as to not kill phone battery when the app isn’t being looked at. When you turn the phone back on, the app seems to “refresh” or repaint the app screen, and that’s when it jumps up. You can almost see it happening, the scrolling and highlighting of row 100…

// This #include statement was automatically added by the Particle IDE.
#include <blynk.h>

char auth[] = "be9e475be7d3482a8e1fbe00bcfffbf6";

int rowIndex = 1;  //set this to 1 instead of 0 to avoid confusion

BLYNK_WRITE(V1) 
{
    Blynk.virtualWrite(V0, "add", rowIndex, "My Event", millis() / 1000);
    Blynk.virtualWrite(V0, "pick", rowIndex);
    Blynk.virtualWrite(V2, rowIndex);
    rowIndex++;
}

void setup()
{

  Blynk.begin(auth);

  //clean table at start
  Blynk.virtualWrite(V0, "clr");
  
  //set counter on phone to 0, not necessary, but avoids confusion
  Blynk.virtualWrite(V2, 0);

}

void loop() {

Blynk.run();

} //End loop()

Table on V0, Button in switch mode on V1, Value Display on V2. Showing phone screen after getting a few button presses past 100 and turning the screen off then back on. If you get several lines past 100, then last added row isn’t even on the screen anymore. This screenshot was actually taken when code initially set rowIndex to 0, so row 99 selected, but works the same when code posted is used…

BLYNK IS AWESOME! BLYNK IS AWESOME! BLYNK IS AWESOME! BLYNK IS AWESOME!

Added a “pick” that runs once a second, all day every day. Table still jumps back up to line 100, but then jumps back down to last row. It gets the table down to the last entered row, but the jumping around is unsightly. I also try to code so that there’s no network activity when there’s no sensor activity - if a door isn’t opening or a pump running, why do a write up to Blynk? This workaround defies that ethos, but gets the job done. @Dmitriy, any chance you could point me in the right direction with this?

Blynk.virtualWrite(V1, "pick", (rowIndex-1));

Since rowindex is incremented after adding the line, subtract 1.