I don't know if you find it useful or not, but I never do it this way.
What I do is assign a tag to each view (label, button, imageview etc.) and check all views looking for the one I want
For example:
Dim p As B4XView = clv1.GetPanel(clvIndex)
For Each v As B4XView In p.GetAllViewsRecursive
If v Is Label then
if v.Tag = "2" Then
do something
Else If v.Tag = "3" then
do something
Endi If
Else If v Is Button then
If v.Tag = "3" Then
do something
End If
Else If v is Panel then
If v.Tag = "25" then
do something
End If
End If
Next
Of course you can assign a meaningful name to a tag (it may relate to the view function) or just use numbers. If you use numbers in designer, you have to remember the the number is treated as a string i.e.
if v.Tag = "2" Then will work, but
if v.Tag = 2 Then will not.
I find it easier than trying to remember which view has what index.