You have a lot of errors:
-
Why you have execute on server? Widgets are client side only.

-
What is this soposed to do? It’s increments index inside for loop, thats why it skips rows.

-
What is this soposed to do? Why are you making an array? It’s is useless, it does nothing.
-
You didn’t add index variable, it’s soposed to count items that pass find substring.
