Index value changed after search in listview

Here it is i thought i explained . it keeps sending index 1 when used filter feature

This may help

/Boban

Any solution? Or I should disabled search? Ahhh it will be hard to find one than

Did you read what Taifun wrote in that thread.

/Boban

The link is taking me to topic “small problem regarding community ads”

ups copy/paste issue.
I copied the text from thunkable but something went wrong, go to the first link I posted.

edit. changed so that the link is not available now, only text so read above.

/Boban

Maybe I’m a nub can u please show me example blocks?

listviewsearch.aia (1.8 KB)

/Boban

4 Likes

@Boban It gives this error

Blocks

screen 2 calling part

image

1 Like

@Boban’s example provides the list item
but you are ony trying to get the index… so only use the index in list block as Boban showed it in the example

Taifun

1 Like

Best way to see what’s happening in the code right-click and do it see tip 4 Top 5 Tips: How to learn App Inventor

/Boban

1 Like

Hello Boban.

I called GetAllRows and assigned them to list elements. I tried your idea but the index is not appearing. Instead, the data of selected element appears.

Kindly help.

There’s the catch. If searched using filter and element is clicked, Selection index is not as desired.

eg: if 1 A, 2 B, 3 C, 4 D. and I search D… Selection index after selection of D is 1 and not 4.

How to solve this?

Because the index you are getting is the index of the new list and not the original list. The original list has 4 items and the resulting list (with filter) has fewer indexes and the order is changed.

1 Like

Thanks for the response, RR.

Is there any way to preserve the indices of the original list and use them/it as index after selection?

This

#off-topic
This Topic is very old.

Tried it.

Instead of index, the selection itself appears on the label.

Please look:

What You see ?
See index 3?

A post was split to a new topic: Search in the list view, index is broken