Search with listview image and text

blocks2


hello I use listview image and text with airtable. I try to create a search. I manage to find the name (I miss the image) and when I click on it I do not go to the name I have chosen.thank you

  1. How you saved your data ? Show the structure of your database
  2. The same item for 3 different things? Image and text ? I hope is only for test
  3. Why fill and delete the listview? Work with variable and list , only at last insert data in the listview to show to the user
1 Like

I work with airtable, when I write in the search I have the requested data (if I delete clear list it does not work), but when I click on the data find when I click on it (so listview image and text click ) I don’t get the requested item


it works but I have an error on click

If I don’t know what kind of data you have and how you store them I can’t help you.
I need to know what is in the variable to check an error
Explain also which is your goal?

Probably your steps could be :

  1. Retrieve data from air table (ex. Got column)
  2. Check the list to find the name (search)
  3. Use this value to get all the values you need in airtable
  4. Upload data in listview

Is the work flow correct?

I am making a currency converter i am using airtable which is loaded by initialized screen then with listview image and text, when i click on it i but the currency value on a button then by writing the amount i get the result. As there is a lot of currency, I wanted to create a search, with "on changed text I get the result, but it’s when I click on it that I had a problem. Now with the last image, there has an error when I click on image and text without the search.

Ok. You want to convert a currency. Show me which is in listview. All the currencies? And where is the value to convert .

So it doesn’t work if gets error :sweat_smile: show the text error too

no the error occurs when I click directly on the currency flag and not in search



I no longer have an error, it works, but that’s not what I want. Here in my search, I have the currencies that appear and when I click on them, the currency appears on the button. what I want is to see the country of the currency and when I click on it on my button it is the name of the currency that appears

and in your variable , so I can help you
Now I show some hint for code

This code running in less than 1 sec , why you want to add items to a listview (first for each) and then clear them to show other item? You have to work with variables and use only the last for each to add items in listview . All will work better and fast.
If I read your code correctly after digit on letter in the textbox you will see in list view only the items from global SearchList. Right?

In search list there are only the items that contains text search, so probably the index of the item in device isn’t in the same position of the item in SearchList

But I have to see what you store in global device and other variable.

Why two listview with the same values?

And also I think you can delete this block in the other screenshot

After search you haven’t to use the position in the list device but the device name to find is index in the main list device (use the block index in list thing) . With this index you will find the country in the main list pays

your when textbox on text changed, i dont think you have constructed properly… please tell us how do you store the image, title and text items in global lists…

by deleting what you crossed out I still have the same thing, just the motto.
on the other hand if I don’t go in the search and I click on an image or motto, I have an error message which is: Select list item: Attempt to get item number 1 of a list of length 0: ()
Note: You will not see another error reported for 5 seconds.

Ref this topic for how to create custom search bar for list view with image. Already multiple answers are there