Hi everyone
I have a simple home inventory app, with tables for items, categories and locations.
But when Iโm on a โviewโ in the app that shows categories, clicking the search icon at the top just searches categories. Iโd like to make it instead search items. Is that possible?
If not, can I hide that top search icon?
The other issue Iโm having is that โsearchโ is so literal. Searching โUsb cableโ finds an item called โusb cableโ but not โusb black cableโ. Is there a simple way to fix that?
Thanks in advance for any help :)))
Toby
Solved! Go to Solution.
Youโre missing some important operators:
Just go to Items view and search the category there. But please make sure you make the category column searchable.
I believe the search bar is searching for string like usb cable and not usb & cable
Thanks but I think you misread what I was asking completely ๐
No, it only searches the displayed table or slice.
Unfortunately, thereโs no way to hide just the search bar but keep the main menu.
Depends on your definition of โsimpleโ. The built-n search feature is a simple exact-text search, as youโve noticed. You could implement your own search feature (but it wouldnโt use the search bar), but itโs not trivial, but it also wouldnโt be horrifically difficult, either. You could also โeasilyโ expand the scope of search while you were at it.
I understand we cant hide the top bar while keeping the (hamburger) menu.
But i noticed your sample app (community28312), doesnโt have the search button on top. Where can I change that?
The search bar doesnโt occur in form views.
That makes sense. Thank you.
The assistant is your best bet for searching the entire appโฆ It actually works really quite wellโฆ
Thanks guys! Assistant is so much better than search, youโre right. Itโs quite counter intuitive though - I wish I could make the โsearchโ button return proper search results like the Assistant does (ie. Not only find perfect phrase matches but rather look for any combo of the search terms in its results).
But yes, looks like Iโm stuck with hiding the search button (and also the menu!). ๐ thanks though for your help!!
Now to work out how to craft an expression for my own search :))
I guess, in plain English, it needs to โ**
take search terms, split it up into separate words, look for โword 1 in table X columns A B C & D, AND word 2 in table X columns A B C & D, AND word 3 in table X columns A B C & D
**โ etc. Plus ideally it would then - after showing those results - show the โorโ version of this.
Why do I suddenly feel like my โno codeโ adventure with AppSheet is just turning into my standard PHP/MySQL coding?
Hmmmm anyone made these sorts of search expressions before?
Toby
Try:
FILTER(
"table",
ISNOTBLANK(
INTERSECT(
SPLIT(TRIM([_THISROW].[search terms]), " "),
(
SPLIT(TRIM([search target column 1]), " "))
+ SPLIT(TRIM([search target column 2]), " "))
...
+ SPLIT(TRIM([search target column N]), " "))
)
)
)
)
Note that punctuators will confound the search some, as the SPLIT() above is strictly on (single) spaces.
Yup.
See also:
Thanks again Steve for your help!
Itโs working, except it only wants to search the โNAMEโ column. As you can see below, Iโm trying to search NAME, STARNUM and DESCR_SIMPLE columns.
I tried adding an โORโ but it gave an error. Help me, oh wise one! ;-))
LINKTOFILTEREDVIEW(โL2_items_bottom_listphotosโ,
ISNOTBLANK(
INTERSECT(
SPLIT(TRIM([_THISROW].[SearchInput]), " "),
(
(SPLIT(TRIM([NAME]), " ")
SPLIT(TRIM([STARNUM]), " ")
SPLIT(TRIM([DESCR_SIMPLE]), " ")
)
))
)
)
Youโre missing some important operators:
Brilliant! Itโs working!! Thanks!!
LINKTOFILTEREDVIEW(โL2_items_bottom_listphotosโ,
ISNOTBLANK(
INTERSECT(
SPLIT(TRIM([_THISROW].[SearchInput]), " "),
(
(SPLIT(TRIM([NAME]), " ")
+SPLIT(TRIM([STARNUM]), " ")
+SPLIT(TRIM([DESCR_SIMPLE]), " ")
)
))
)
)
The + trips me up because itโs a plus but itโs actually an โorโ, sorta. lol.
Please donโt waste your Saturday replying to this today lol - but my next question isโฆ If any of the columns contain โbutterโ, and I search for โbutโ, it doesnโt return a result. Looking through all the functions, Iโm assuming I need to add some sort of โcontainsโ function. Iโm just not sure where! lol
Seems to me that INTERSECT is doing the heavy lifting in the statement, yes? Itโs finding whether there is any โcommonalityโ between my search formโs input and some columns in the table. And I need to tell it to โdonโt just look for exact matches, but partial matches are fineโ. Hmmm.
No, itโs a plus. See Constructing a List with Subtraction here:
Correct.
Thatโs an entirely different requirement than you originally expressed. Iโm not aware of a way to do partial matches with multiple terms from a single input without resorting to some ugly contrivances. Itโs doable, but itโs ugly.
How I spent my weekendโฆ
https://www.appsheet.com/samples/community28312?appGuidString=2ea965d7-8656-4d9d-a9d2-ed3dc5ca5813
Thanks for the inspiration!
Thank you Steve. I would gently suggest you open up new thread with tips and tricks category so that this sample app stands out!
Youโre awesome, Steve! Youโve been so helpful to me. I really wish I had time to post all the stuff Iโve learned and a quick learning video as Iโve managed to do what I wanted (ie. make a full inventory app for myself) but it was extremely difficult, particuarly with the search issues but also with trying to implement a โcategories /subcategories/subsubcategories/subsubsubcategoriesโ system in AppSheet. (Iโm glad I already knew javascript/php/asp/mysql so I could figure it out, otherwise I would have been even MORE lost! lol)
I will check out your search thing when I get a chance!!!
Hello Steve: do you think it is possible to make a search engine that search for the exact text? For example, if I search for "red" in a given column, it only returns red and not redstone? Or if I search for โcoldโ it only returns me columns with "cold" but not "coldplay" please.:)
That's what this entire topic is about. How does the solution given above not meet your needs?
User | Count |
---|---|
41 | |
36 | |
30 | |
23 | |
16 |