Topic Options
#51704 - 11/23/16 10:01 AM Gridview Search By Begin with
CarlosC Offline
Adagio Fan

Registered: 03/21/08
Posts: 31
Loc: North Bay, ON, Canada
(209.91.159.106)
Hello,

I am creating a filter in GridView and I am wondering if it is possible to search by begin with.
Under the comparisons I only see less/greater than/equal, equals. and not equal.

Is there a round about way to search items beginning with PROMO for example?

Thanks.

Top
#51705 - 11/23/16 10:04 AM Re: Gridview Search By Begin with [Re: CarlosC]
Michael Mulrooney Offline
Adagio Virtuoso

Registered: 02/07/02
Posts: 839
Loc: Vancouver, BC
(184.70.7.174)
Left({Field Name},5) = "PROMO"

Top
#51708 - 11/23/16 11:17 AM Re: Gridview Search By Begin with [Re: Michael Mulrooney]
CarlosC Offline
Adagio Fan

Registered: 03/21/08
Posts: 31
Loc: North Bay, ON, Canada
(209.91.159.106)
That might do the trick.

But is there anyway of combining it with QueryString() ?

Top
#51709 - 11/23/16 11:30 AM Re: Gridview Search By Begin with [Re: CarlosC]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
(98.155.92.40)
Code:
LEFT({Field Name},LENGTH(QUERYSTRING("Begins with?","")))=QUERYSTRING("Begins with?","")


If you want the test NOT to be case sensitive, then use:
Code:
UPPER(LEFT({Field Name},LENGTH(QUERYSTRING("Begins with?",""))))=UPPER(QUERYSTRING("Begins with?",""))


Attachments
BeginsWith.zip (39 downloads)



Edited by Andrew Bates (11/23/16 11:34 AM)
Edit Reason: Attached example
_________________________
Andrew Bates

Top
#51712 - 11/23/16 12:06 PM Re: Gridview Search By Begin with [Re: Retired_Guy]
CarlosC Offline
Adagio Fan

Registered: 03/21/08
Posts: 31
Loc: North Bay, ON, Canada
(209.91.159.106)
Beautiful! Thanks Andrew!

Top


Moderator:  Christa_Meissner 
Who's Online
1 registered (Brian_Shead), 223 Guests and 0 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
1873 Members
5 Forums
14553 Topics
71030 Posts

Max Online: 432 @ 01/20/25 10:17 PM
October
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