Custom Search Bar with Simple & Dynamic Listview | Guide

Hi @Sener_AYDIN

I sent you a PM check that :slightly_smiling_face:

Hi, I have a new added and updated products table, which consists of 2000 rows. I want to make an application for this table. (listview_image_and_text) I did this. I want to make a search bar for this application. Actually the same as you do. Only database will be Google sheet. Maybe it would be nice to choose categories and subcategories at the bottom of the search bar.

I will post a test apk as per your requirement tommorow :slightly_smiling_face:

Wow. Great

If you are on telegram, click here and send me hi :wave:

How do I add more items? I have a list with image, title and subtitle and wanted to know how to implement it this way too.

Suppose you have 3 lists, for image, title, subtitles.

And you are searching from title list. So when you you get the item, you can use it’s index to get other item’s from another list.

If you need I will post blocks

I got to this part here, but the only problem is that if a list has 2 same items it gives an error. If you can take a look and correct it please :slightly_smiling_face:

ProjecTest1.aia (256,3,KB)

Ahh…yeah I know about that issue/bug. We can’t do anything about that, because App Inventor list work in that way.

If a list has 2 same items, it will return the index of first item.

It’s a bug, but we can’t do anything.

Maybe @Vishwas @Taifun @pavi2410 or other want to tell more about it.

Sorry for tagging.

So you wouldn’t have any other way to do a search by pulling up three pieces of information?

Try this and see if it works for you

ProjecTest2.aia (261.2 KB)

1 Like

It is because the list is searched linearly and hence, returns the first item found.

So can it be changed to work better and efficiently.
It will be good, if kodular does it.

Because these small issues, interfere in making a good/better/complex app, I also faced this while making Onyx Note, but I somehow managed it.

You can bypass it by saving items and index in original list

No, that’s how it is intended to work. And even if we do, it will break other projects.

Sad :frowning_face:

I don’t know whether it’s possible but a different block which execute the required function, without breaking current project.

What is the structure of the list?

Sorry, I didn’t get what you mean.

P.S a simple list with 2 similar item’s.

What elements does the list contain?

For example ( hello hi test hello )

It always return 1 as index

1 Like