List view image and text with search bar issue

i use list view image and text i want to add search bar for that i created block


if i click after search then it take data of the of main list

Hi dear,

you haven’t clearly specified what the error is.

what does the second for loop do?

These days using listview’s make things have limitations, have u try using Recyclerlist or Dynamic components?

For example if in list there is A, B, C, D and if I click on A get value 1, for B get 2, like this which is store in sheet. I normal case it shows correct value but problem is that if I search C it appear at top place and if I click on it, it should be show 3 but it shows 1 which is for A.i need if click C it should show value for that C

It’s correct that it returns 1,
You’re clearing the list and recreating it with the filtered elements.
For example,
If you filter to show only the third row, that element no longer has index 3 but index 1.

One solution would be to create a separate variable to keep track of the indexes you’re displaying.
I’ll finish a thing and try to give you an example with blocks.

edit:

Here it is,

I removed some parts that I didn’t consider necessary, like the variable for saving the URLs, if it’s really needed, you can explain it to me better.

Very simply, I created a variable filtered_indexes that will contain the indices of what we’re displaying, as I explained above.
When clicking on an element, it will retrieve its position in the filtered_indexes and it will select that index from the main_list then selecting the fourth element, the URL.