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/

2 Likes

Hi @jared, 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: