How to get search results from 2 columns in a csv file

Hello. I have been struggling with getting search results for data beyond the first column of my csv file. The file contains movies and their directors. The search button only recognises the movie column, but I need it to also recognise the director column, such that it is possible to search for both “Titanic” and “James Cameron”, so that typing one would bring out the other and vice versa. How can this be done? Please help!!

PS: Just in case someone suggests it, please be aware that this tutorial on Youtube doesn’t help: Creating Custom Searches and Search Bars in Adalo - YouTube.

Hi @midwest,

Welcome to the forum!
Just wondering - why the solution by @pfordmedia didn’t work for you? Is there any specific problem? Could you please elaborate?

When you create/update the new record in your DB collection, you could always update the value of “Search Index” field, and put all the required information there. And then you could use this “Search Index” field as a filter for your search bar.

Best regards, Victor.

Hi Victor,

Thanks for the welcome and for responding. The problem with Mr Ford’s great solution to me is in two parts. It’s helped many people as I saw on the YouTube page but I couldn’t use it. The two parts:

  1. The video seems too fast and elaborate for me. It also seems to assume viewers know things I don’t. Generally, I’ll prefer a text-based step-by-step solution and as I’m not quite technical, I’d appreciate if it was written like I’m a 5 year old.

  2. The solution in the video also seems to be for an app that would like to have users contribute to the database. What I am trying to create is a platform users can only search up information across columns in a csv file. (Kinda like a dictionary.) Users will not be granted access to add anything to the database. At least for the first few months of launching.

So let’s say in my example, the aim of the app is to give users a brief synopsis of a movie and a director’s name. In the uploaded csv file, we have 3 columns: film title, film director, and film synopsis.

I need a user to type James Cameron in the app’s search bar and have this lead to a screen having Titanic as title, James Cameron as its director, and “ship sinks” as its synopsis. I also need for the user to be able to type Titanic and have it produce that same information on the same screen. I would also like for the user to type “ship” and it takes us to the same Titanic page (and to show other film titles, synopsis, or director with “ship” in their spelling).

I hope my example is quite clear (even to a 5 year old because that is the kind of solution I would love and be able to work with.) #NotSoSmart

Might you be able to help?

Hi @midwest,

Ok, thanks for the explanation.
What you can do is:

  1. Modify your CSV file. Add the new column “SearchIndex”. Put all the information you’d like to be “searchable” into this column, separate it some character, space, for example.
    For example, initial data row you had:
    “Titanic”,“James Cameron”,“Ship Sinks”
    The new CSV file row will be:
    “Titanic”,“James Cameron”,“Ship Sinks”,“Titanic James Cameron Ship Sinks”.
    You may see that last row is a SearchIndex.

  2. Modify your films collection - add a “SearchIndex” field, make it a Text field.

  3. Upload the modified CSV file to Adalo (as for me - this is usually the most complicated part, as the builder require quire strict CSV formatting).

  4. Use “SearchIndex” field as a filter for your search.

  5. Enjoy the results :slight_smile:


Thank you so much!

I’ll try this in a few hours but I can already tell it’ll work. Thank you.

As you have mentioned, the real trouble would lie in the formatting of the “search index” column to differentiate the different film titles, directors, and synopses.

From what I know of csv files, it is impossible to have even simple formatting like bold or italics show. Tricky problem when you care about the aesthetics of the app.

Better than nothing though, it must be said.

Thank you!

Hi @midwest,

Just as a note - seems you’re mixing the “Data” and “Presentation” here. Formatting isn’t directly related to CSV in this solution. :slight_smile:

At the moment you have “Data”: a CSV file with a list of films, directors, descriptions.

So what you can achieve with Adalo:

  • create a data structure (Collection(s)) to store the information from CSV
  • upload a CSV and put the data into the collection(s). After this you’re not managing CSV anymore - you are working with the data stored in the your Adalo app’s database
  • then create a screen(s), which present/show your data to your users
  • and you can format the data presentation on the screens in various ways. For example, make the film title bold with 20px font, put the description into the rectangle, etc. etc.

I’d say that Adalo is quite easy to use, but anyway you have to learn and become a bit more technical when creating an app with it. It’s like driving a car - an easy task for lots of people, but anyway one needs to learn how to drive first :slight_smile:

If you didn’t do so, I would advice to visit and read the basic tutorials there - they are easy to understand and can help a lot in future.

Best regards, Victor.

Hi Victor,

Thanks. I’m probably mixing something up. I guess I’ll find out when I try out the solution in a bit.

Meanwhile, I have gone through the tutorials a couple of times: it is how a non-techie like myself has been able to come even this far on Adalo. It just so happens that my partner and I have been unable to crack this part after many readings, YouTubings, and Googlings.

To come back to the solution you proferred, what I was referring to is that if you upload the modified csv with a fourth header named Search Index with “Titanic James Cameron Ship Sinks” as data on one row, and then added a “Search Index” field in the collection on Adalo, the app would show “Titanic James Cameron Ship Sinks” if you searched, say, “James”.

And, unfortunately, there’s no way of formatting each of those words individually even within the app.

I realise I’m missing something after typing that.

Are you saying the search button would yield only data from the first three columns of the csv? What I understand is that search would yield exactly this, “Titanic James Cameron Ship Sinks”, from your solution. And then app formatting would affect all of those words because they belong in one row under “search index” even within the app.

This has become quite long. Apologies.

FYI: We had to use separate screens and manipulate the database for this to work. Nothing else did.