Previous Thread
Next Thread
Print Thread
Joined: Mar 2008
Posts: 31
C
Adagio Fan
Adagio Fan
C Offline
Joined: Mar 2008
Posts: 31
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.

Joined: Feb 2002
Posts: 839
M
Adagio Virtuoso
Adagio Virtuoso
M Offline
Joined: Feb 2002
Posts: 839
Left({Field Name},5) = "PROMO"

Joined: Mar 2008
Posts: 31
C
Adagio Fan
Adagio Fan
C Offline
Joined: Mar 2008
Posts: 31
That might do the trick.

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

Joined: Mar 1999
Posts: 10,504
Adagio Master
Adagio Master
Joined: Mar 1999
Posts: 10,504
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 (5.06 KB, 72 downloads)

Last edited by Andrew Bates; 11/23/16 05:34 PM. Reason: Attached example

Andrew Bates
Joined: Mar 2008
Posts: 31
C
Adagio Fan
Adagio Fan
C Offline
Joined: Mar 2008
Posts: 31
Beautiful! Thanks Andrew!


Moderated by  Softrak Support 

Link Copied to Clipboard
Who's Online Now
0 members (), 45 guests, and 3 robots.
Key: Admin, Global Mod, Mod
Forum Statistics
Forums5
Topics14,683
Posts71,655
Members1,875
Most Online1,408
Dec 9th, 2025
November
S M T W T F S
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
Powered by UBB.threads™ PHP Forum Software 8.0.0