Text control box for search?

I’m creating a search-based detail view.

Up top, I have:

Person to view: [control button to select from list of people]

This lets me to start to type a person’s name, then select from a drop-down list.

Then, below that, a table filtered to show just the person or people who matches that control.

However, this allows me to do only a full text search.

Instead of a Control to choose from a list, I’d like to be able to have a control that just lets me enter text.

That way, say, if I type “Mary” I’ll get a table filtered to show just the people with “Mary” in their name.

Right now, the workaround is to replace the control with a new table, one that just holds the “Selected Name” choice.

Also, the table updates automatically when I input new control data, but it doesn’t automatically go to the first record found. Instead, it continues to show the previously chosen row, but just adds the new finds to the selection.

Is there a way to refresh the table? Even hitting the refresh button in the browser tab doesn’t work. It still shows the previously chosen row in addition to the newly found rows.

I thought of having a button to switch to another view, then a button to go back to the first view, and do one after the other, but it seems to stop executing buttons after hitting the first hyperlink.

I understand that the current detail view has built-in search functionality, but this is for those cases where the built-in function isn’t enough.

Thanks!
– Maria

2 Likes

Is this what you’re looking for?

7 Likes

If you type “Lashunda” into the search Box, and hit return, just Lashunda’s row comes up. If you type “Guy”, Guy’s row shows up.

That’s exactly the functionality I was expecting.

But if you switch the view of the bottom table of employees to “detail” view, now you get the found rows PLUS the row you were previously looking at – and it’s the previous row that is still selected.

How do you go to the first selected result, or just clear the selection?

Best,
Maria

This feels like a bug (and a good catch!). We have logic that will “hold a row in a view” if it’s been filtered out but you’re still actively “in” the row - so that rows don’t fly away while you’re editing them. Looks like the detail view is interpreting this incorrectly. Following up with the team.

Thanks! Fixing that will also make all my “go to this row” buttons work much better, and make the Wiki I’m building a lot more navigable.

Best,
Maria

Thanks @shishir I was looking exactly for this.
One question. Is it possible to add a button (e.g., “Search”) to trigger the filter? In other words, I would like to add a search term, then click “Search” and get the results filtered as shown above?

Thanks!!

1 Like

Sure. I would put a button column on the “Search” table in that example. When pressed have the button take the info in the input column and duplicate it into the value column.

Here’s an example:

3 Likes

I was just realizing how helpful a setFilter() method would be for a given table.

i.e. [Table].setFilter([Table].[Full Name].contains([Text Control].[String]))

In fact, all of the table overall formatting functions need formula methods. Any chance, Codans? (does this already exist and I haven’t found it?)

EDIT: And yes, a Text Control (string input) is sorely needed. We have just about all the other controls we need, but we can’t let the user enter formula-available strings on the canvas. Let’s have it!!! :smiley:

2 Likes

This solution works wonderfully when there is only one user performing a search at a time, but what happens if there needs to be concurrent searches?
Currently, User 1 would perform the search and get the results needed, but if User 2 performs a search at the same time, it will over-ride User 1 search.

Possible resolution idea:
I’m thinking that you could add rows for each user in the search table and filter THAT table by the user, which would only show one row (the current user). Then User 1 could perform their search while User 2 is performing their own concurrent search.

However, I’m not sure how to pass that search table’s current row into the filter of the table being searched (View of Employees).

Any thoughts on how this can be resolved?

There’s a playground doc by @BenLee here, it has personalized search inputs.

Basically it’s separate rows per every user, and filter that takes into account current user’s search input:

1 Like

Dude! This is perfect!

I’ll have to make a few modifications for my Doc, but this is exactly what I was looking form. Thank you to @Paul_Danyliuk and @BenLee and @shishir for the post.

-Leo Saumure

1 Like

Hi all, we’re working now on a new textbox control!

We’d love your feedback on some of the final details if you’re willing to try it out.

Please fill out this form if you’re interested, and we’ll follow up. Thanks!

6 Likes

Hi,

I could use some help as I am a little noob on Coda and still want a search box for my main table of activities. I’ve tried the method, but there is something I am missing. Do you, by any chance, have a template of the method? because the Shishir’s tip and tricks doc’s tables are read-only and I can’t see the formulas to figure it out where I go wrong.

Thank you,

Dear @Alexandru_Dan ,

The explanation is very detailed and I recommend to copy the doc as explained in the picture below:

The copy will be “open” for editing and you will have access to the formulas.

If you prefer you could copy the page to your own doc, as follows:

1 Like

Thank you, but meanwhile coda released the search box so it’s a little better :slight_smile:

Best regards!

1 Like

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