Can anybody explain how to search items in a list (from airtable)?

This seems to be a pretty simple one but I keep seeing different explanations everywhere, none of which I can get to work for me.

This is my most recent attempt which does absolutely nothing:

Beforehand it was looking like this, which is basically the screen with the lists etc but no search function:

Here is the format of my database, but on this screen the user will only be seeing the items below the restaurant names (Column names).


Here is an image of the screen, with the list items on the top and the selected list items on the bottom (bottom two items).

If anybody can explain, that would be amazing! :smiley:

If you look for @actech’s demo app, he has an example of how search a list

https://x.thunkable.com/projects/5d70f93f8a62b4079eedaff2/project/properties/designer/

1 Like

Hi @jgibb20189, I’m not sure which screen I should be looking at on this?

In the list the screen is called “finder”

In your first screenshot, you’re initializing app tempObject to “” (an empty string) but then checking if does app tempObject contain [your text input]. That’s always going to be false because it’s an empty string that you’re checking.

I think your mistake is that you’re setting stored LOGIN_INFO to the ith item of app tempList (an empty list) but you should instead be setting app tempObject to in list app entireList get #i.

Hi @tatiang, thank you for pointing this out! I have now made the adjustment where I had accidently added the login variable but I am still seeing no results. Just to confirm, does this look like I’m approaching the search the right way? I’m hoping the search results will display within the ‘item-list’ - or thinking about it, it is more ideal that everything other than the results disappear if that makes sense - since that list is already populated.

I hope I don’t come across as too silly but I really don’t understand what I’m looking at in that screen, I can’t gauge the logical order of things! :grimacing: I’ll keep trying!

its probably complex. what about @tatiang’s advice. was that helpful at all for you? He’s always a great resource for information!

I’ve actually given that one a go but it still doesn’t seem to work for me, I think I have done it properly!

Sorry I can’t help further today. I have sworn off the app builder (not the forum tho :wink: ) this week in an effort to spend time working on my thesis. If you are still experiencing this during this coming weekend I will try to help. i doubt you will be though. Keep at it!

Well thank you for your help anyway! :smiley: Good luck on your thesis!! :smiley:

Oooh, what’s your thesis on?

This might be off post topic but… my whole project relates to the fact that mobile technology is ubiquitous and paper and pencil anything is pretty much outdated and not always handy at this point for most of our culture/society. As a behavioral scientist and applied behavior analyst working with individuals with autism, data are important to me. They let me know whether or not my intervention is working. The more there are the better. The sooner i get them the better. The more reliable/accurate they are, the better. These let me know whether or not i need to change the program or keep it the same and i can make these decisions on a day to day basis when i have sufficient data.

Many of the parents and educators I work with frequently complain that they have to record data with pencil and paper. they say it is not convenient and cumbersome. So, they just don’t do it. Instead of strong arming families into taking data or threatening to take away services if they don’t, I’d rather use a different approach and build a system conducive to data collecting itself.

I am studying the efficacy of a simple electronic data collection system with built in prompts (push messages) and social rewards (i text my clients after they submit data about the data with a personalized message) as compared to traditional data collection methods of leaving a data sheet with a parent and collecting it in 2 weeks to a month. I want to find out which one results in more data collecting behaviors.

I will then present this at a conference later in the year hopefully. I have already piloted the app and my parents really like it compared with previous data sheets I have left them. Now, it’s time to go through the human subjects institutional review board and get actual study participants!

Medicine is already using this mobile tech to help with medicine adherence and getting patients to appointments. I want to bring it to the world of mental health for this and at least 1 other study I plan to conduct this year

[ALSO] if anybody ever wants to talk autism treatment, behavior analysis, psychology, the value of data collection, or organizational business management. HIT ME UP!

4 Likes

Sorry, my Adobe Illustrator just de-licensed itself so I’m not as able to illustrate what I mean but in the newest screenshot, when you click the Item-Search-Button, it calls the function updateTempList and then there’s an error in this section:

Screen Shot 2020-02-09 at 4.18.38 PM

You need to replace app tempList with app entireList

I’m not 100% sure that will fix everything but I’d start there. If that’s still not working, consider sharing a link to your project. It’s a bit tricky to troubleshoot without seeing the whole thing.

1 Like

Hi, @chris.bailey230698t! :wave:

A short solution for you would be like this -

image

Notes -

Variable x is my airtable list, and variable y is a temporary empty-list (which would be the search results list later). I have used a listViewer in my example, which is set to showcase the x list. So, when the user inputs his query, and hits the search button,

  • First, the listviewer goes blank, showing that it’s searching.
  • Next, the y list is re-set to an empty list, just to erase the previous search results.
  • Now a for-loop runs itself, and iterates item-by-item in the x list.
  • Inside nested is an if-else condition, which (for every item) checks weather the item contains the given input.
  • If yes, then in the y list, it inserts the item, which means the item is one of the search results.
  • Everytime the y list gets updated, the ListViewer refreshes too, showing the user the latest list.
  • If the item does NOT contain the input, it continues with next iteration (item) of the loop.
  • This process loops everytime, till the very-last item if the x list.

Hope I helped you! :slightly_smiling_face:

Good Luck! :+1:
Thanks! :blush:

P.S. My Solution is somewhat like @tatiang’s, but it’s efficient and uses less blocks. Both would properly work for you :+1:

This sounds awesome, what an interesting topic! :smiley:

1 Like

Hey @kartik14, this seems to be making some progress - everything disappears as though it is waiting to present some items however nothing appears… the one by @tatiang seems to not do anything and I imagine it is something else in my code causing the issue. Here is what happens so far:


I’m happy to share my project if you can’t seem to see the issue here and want to take a closer look!

Thank you!

Hi @tatiang, thank you for this! I’ve given that a go but it still seems as though it doesn’t want to budge. Nothing seems to happen when I actually click that search button. I have tried @kartik14 idea and it seems to be making everything disappear as though expecting results to occur however nothing seems to show. I assume it’s issues elsewhere in my code.

Is app entireList populated with data? What happens when you try to view it using a list viewer or with something like from label set text to in list get #1? Just to verify that it’s not empty.

What happens when you set a label’s text to from Item-Search-Input get Text to verify that that is not empty?

Can you PM me a link to your project or post it here?

Hi @tatiang I’ve sent you a link to my project :slight_smile: