Search Button

Hello, I want to add a search button to my home page in my application. I looked at previously opened help topics one by one, but I couldn’t find exactly what I wanted. Some of the topics were very old, so I would like to ask for your help, thinking that maybe it is a problem that has been solved with an update. I want users to be able to access data in any tab in the application by searching. And when I click on the results, I want it to go to the list in the tab where the result is located. I want users who are not logged in to be able to use this search screen. When I search in the collection component I added, I can only search the rows in the collection list, not the other data tables I connected with relation. Can you help me if there is a method to achieve what I want?

You can do something like this:

  • Create a separate single row table to drive your main search screen
  • Add a RowID column, and a user specific text column to hold the search text.
  • Then in every table that you want to search, add the following columns:
    – A single value column that takes the value of the user specific column in your search table and applies it to all rows
    – An if-then-else column that returns true for any row that matches.
    – If you want to match several columns, then you’ll need a separate if-then-else column for each column to be matched, and then a final it-then-else column that returns true if any of the others are checked.
    – Alternatively, you could create a template column that concatenates all the values in the columns that you want to match, and then use a single if-then-else column to compare to that. Either way will work.
  • In the layout on the search screen, you’ll need a text entry component to accept the search text, which should be targeted at the user specific column.
  • You’ll then need a separate collection component for each table to be searched. Each collection should use a separate table as the source, and be filtered where the if-then-else matching column is checked.
  • For navigation from the search results, the default action will be to show the details screen of the selected item. If instead you want to show the parent screen of the selected item, you’ll need to change that. What you’ll need depends how your screens/tabs are laid out, but it’ll probably be either a Go To Tab or Show Details Screen->Table action.
1 Like

Hello Darren, everything is explained very well, but what I want is to have a button where users who use the application without logging in can search. I think it is not possible for general users who are not included in the user table to make searches.

I don’t see anything in @Darren_Murphy’s steps that mention the need to do anything with the user table, so I don’t see why it wouldn’t work regardless if a user is signed in or not.

1 Like

You think wrong :slight_smile:
If you set it up the way I described, it will work for any user, regardless of whether they are signed in or not.

1 Like

In a previous problem you solved, I thought it wouldn’t work with the user table and I was wrong. I think I made the same mistake a second time. I will try it thank you :grimacing:

Yes, the technique won’t work with the User Profiles table for non-signed in users. But the solution I offered here doesn’t require a User Profiles table.

1 Like

Now I understand it much more clearly. Since I don’t know English, I was using google translate and it translated a bit complicated so I thought it was related to the user table. ChatGPT summarized the situation very well for me, now I am starting to implement the procedures, thank you very much :slight_smile:

Darren you are amazing. The search screen worked, but it does not show results unless the text in the tables I associate with if then else matches exactly. Is there a simple way to solve this? For example, the line says “Kunz Aircraft Recovery”. After I type “Kunz” on the search screen, is it possible to revise the If-Then-Else column to give results without typing the entire text? For example, if the first 4 letters match, the result will be displayed. And I wonder if there is a way to disable case sensitivity?

You should use “includes” in your if-then-else column.

To deal with case sensitivity, you can use the template option and use the Text to Lowercase column to convert everything to lowercase for comparison.

I did it this way and it worked. Is there any problem? I set the If then else column to “is included in”, thus eliminating case sensitivity. When I select Included, the if then else column is set to always show true when nothing is written on the search screen. To prevent this, I set the search button is not empty as the visibility condition for my lists on the search screen. In this way, when I type a letter on the search screen, the rows in all tables containing the text I typed are listed one under the other. This is not a problem for me. I like that it works this way. If I add too many data tables to my search screen, will there be any problems later because too many rows will appear?

When I used the Includes option, I applied this method because no lines were listed unless I wrote the entire text.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.