Topic Options
#7903 - 11/08/06 10:38 AM Gridview Limits
bal Offline
Adagio Ace

Registered: 03/29/99
Posts: 216
Loc: Ottawa
Are there any limits when setting up a filter in Gridview?

This is my filter:
AND
(
{Date} >= QUERYDATE("Enter start Date",DATE(2005,01,01))
,
{Date} <= QUERYDATE("Enter end Date",DATE(2005,12,31))
,
OR
(
Trim({Docket})="31-01"
,
Trim({Docket})="31-02"
,
Trim({Docket})="31-03"
,
Trim({Docket})="31-04"
,
Trim({Docket})="31-05"
,
Trim({Docket})="57-09"
,
Trim({Docket})="57-15"
,
Trim({Docket})="54-32"
,
Trim({Docket})="57-04"
,
Trim({Docket})="57-08"
,
Trim({Docket})="57-10"
,
Trim({Docket})="57-16"
,
Trim({Docket})="57-17"
,
Trim({Docket})="57-18"
,
Trim({Docket})="32-01"


)
,
{Disb Amt} <>0.00
,
{Disbursement} <>" "
,
TRIM({Disbursement})<>"AIR"
,
TRIM({Disbursement})<>"TAXI"
,
TRIM({Disbursement})<>"COUR"
,
TRIM({Disbursement})<>"CUST"
,
TRIM({Disbursement})<>"MEAL"
,
TRIM({Disbursement})<>"MILE"
,
TRIM({Disbursement})<>"PARK"
,
TRIM({Disbursement})<>"ACCO"
,
TRIM({Disbursement})<>"AUTO"
,
TRIM({Disbursement})<>"GAS"
,
TRIM({Disbursement})<>"SHIP"
)
I need to add several more dockets but if I add one more line, no matter what it is, the verification fails.

Thanks


Edited by bal (11/08/06 10:39 AM)

Top
#7905 - 11/08/06 11:30 AM Re: Gridview Limits [Re: bal]
Softrak Support Offline

Adagio Action Team

Registered: 03/09/99
Posts: 11570
Loc: Vancouver, BC Canada
Hi bal,

There likely is a limit to the length of the formula text that you are hitting.

There is a better way of doing formulas where you want to select specific dockets for the view.

Rather than using OR and a whole list of dockets where each comparison needs TRIM({Docket #}) every time, you can save space by using the FINDANY function and you only need it once:

FINDANY( TRIM({Docket #}) , "31-01","31-02","31-03",...,"32-01")

This will be way shorter than what you have now, meaning you can add more to the list. Do the same for the Disbursement selection, but because you don't want specific codes, surround everything with NOT( ) :

NOT( FINDANY( TRIM({Disbursement}) , "AIR","TAXI",...,"SHIP") )
_________________________
Regards,
Softrak Tech Support

Top
#7907 - 11/08/06 12:52 PM Re: Gridview Limits [Re: Softrak Support]
Retired_Guy Offline
Adagio Master

Registered: 03/16/99
Posts: 10504
Loc: Canada
Hi bal,

There is a hard limit of the number of characters in a filter (it's large, but obviously you've hit it here).

Would it be possible to use the "comment" field in the docket to identify the files you want to look at? Or perhaps one of the staff member codes? For example, if you placed the string "XYZ" in the comment of the dockets you wanted to select, then you could just use the formula:

FIND("XYZ",{Comment},1)<>0

to identify the file.

Another way to select items from an arbitrarily long list is to use a "NamedItem" file. Use Edit | Named items to create a list of the dockets with the letter "X" after the docket number, with the "Value" for the named item as the letter "X". Then use the formula:

GETNAMEDITEM(CONCATENATE({Docket #},"X"))="X"

GETNAMEDITEM(s) looks up a string in the named item file, and returns the value on the right side of the equals when a match is encountered. (Don't forget to save the "Named Item" file after you have created the list.)

The "Named item" file is a simple text file that can be editied with Notepad if you desire. Here's a named item file with a single entry:

Code:
[NamedItems]
TECH01X=X
_________________________
Andrew Bates

Top
#7917 - 11/08/06 04:05 PM Re: Gridview Limits [Re: Retired_Guy]
bal Offline
Adagio Ace

Registered: 03/29/99
Posts: 216
Loc: Ottawa
Thanks very much. I tried the "FINDANY" and "FINDANY(NOT)".
They both worked.
Tomorrow I'll try Andrew's suggestion.
This program is an amazing tool.

Top


Moderator:  Christa_Meissner 
Who's Online
1 registered (Rebecca Young), 55 Guests and 1 Spider online.
Key: Admin, Global Mod, Mod
Forum Stats
1865 Members
5 Forums
14482 Topics
70724 Posts

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