Topic Options
#65547 - 01/27/21 12:43 PM Is it possible to QUERYSTRING with multiple words?
AGatewood Offline
Adagio Groupie

Registered: 01/22/19
Posts: 17
Loc: Canada
In Gridview
Instead of searching our records with the following...

RECORDCONTAINS(QUERYSTRING("Enter Search Word"))

Is there any way I could add a second word to narrow the query?
if searching for "red shirt" in the Query I would like to be able to return all items that contain those words but not in any particular order.
"red large shirt", "shirt medium red", "shirt made with red trim", etc.

Top
#65548 - 01/27/21 12:47 PM Re: Is it possible to QUERYSTRING with multiple words? [Re: AGatewood]
AGatewood Offline
Adagio Groupie

Registered: 01/22/19
Posts: 17
Loc: Canada
There doesn't seem to be a split function to separate the "red" and "shirt".

Top
#65553 - 01/27/21 03:38 PM Re: Is it possible to QUERYSTRING with multiple words? [Re: AGatewood]
Softrak Support Offline

Adagio Action Team

Registered: 03/09/99
Posts: 11324
Loc: Vancouver, BC Canada
Hi AGatewood,

There is a function in GridView called MatchAny, where the result is True if any one if a given number of search words (like red or shirt) are found within a target string. But you are correct that you cannot enter one string such as 'red shirt' and each word parses out automatically. You would have to use a separate QueryString function to ask for each word. Something like:

MatchAny({text to search},QueryString("Search word 1"),QueryString("Search word 2"))

There is another similar function called MatchAll, where the result is True only if every search word is found.

I'm guessing the MatchAll behaviour is what you are looking for.

Maybe there is a way to do what you want in combination, such as the QueryString formula being in a calculated column, then a second calculated column calculates text by replacing spaces with commas in order to fit the syntax for MatchAll. Or something like that.
_________________________
Regards,
Softrak Tech Support

Top
#65555 - 01/28/21 07:33 AM Re: Is it possible to QUERYSTRING with multiple words? [Re: Softrak Support]
Samuel Kopstick Offline
Adagio Virtuoso

Registered: 06/15/07
Posts: 895
Loc: GTA & North America (Remote Su...
I have had to do this for a client a couple of years ago.
We achieved this by creating a Gridview Workspace that contains a number of Views.

Briefly, we are performing a search of the Description field of all the detail OE records.
We first perform a search in the first View for a specific Customer for some text, such as “red”, that appears anywhere in the Description field of all the historical OE Invoices.
This generates a second View that filters all the records that contain the word “red” anywhere in the Details line (with other relevant data).
We next click in this second View to further limit the View for another text, such as “large”.
This generates a third View that displays only the records that display both the words “red” and "large".

This is a bit complicated, but if you are performing these kinds of searches on a regular basis, it may be well worth it to create this Workspace.

You can ask your dealer about this, or either you or your dealer can contact me for more information.
_________________________
Samuel Kopstick
S Kopstick & Associates Inc
Toronto, ON

Top
#65560 - 01/28/21 04:50 PM Re: Is it possible to QUERYSTRING with multiple words? [Re: Samuel Kopstick]
Patricia B. Offline
Adagio Maestro

Registered: 06/26/08
Posts: 1123
Loc: Langley, BC
Hi Adrian:

I would use as filter like this:

and(
FIND({w1} ,{Description},1 ),
FIND({w2} ,{Description},1 )
)

You can query the words one by one as calculated values or in the filter or you will need to do a formula to split them in two different words.
_________________________
Patricia Balbuena Cotlear
AP SMART SUPPORT
236 991 3060





Top
#65562 - 01/29/21 08:55 AM Re: Is it possible to QUERYSTRING with multiple words? [Re: Patricia B.]
Douglas Dickie Offline
Adagio God

Registered: 06/02/99
Posts: 4322
Loc: Vancouver, BC
Adrian:

If you need further assistance please give us a call.
_________________________
Douglas Dickie
AccSys Solutions Inc
Phone: 1.888.534.4344
ddickie@accsyssolutions.com

Top


Moderator:  Softrak Support 
Who's Online
0 registered (), 98 Guests and 1 Spider online.
Key: Admin, Global Mod, Mod
Forum Stats
1848 Members
5 Forums
14242 Topics
69746 Posts

Max Online: 359 @ 11/18/19 09:08 PM
May
Su M Tu W Th F Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31