|
|
Joined: Mar 1999
Posts: 216
Adagio Ace
|
|
Adagio Ace
Joined: Mar 1999
Posts: 216 |
I am trying to use the QUERYDATE function. I am querying a TB WIP database.
I am using: {TransDate}<=QUERYDATE("Enter starting date",01-01-05)
A calendar pops up starting 1900. Obviously I don't want to scroll through 105 years to choose my beginning date!
Currently I want to look at transactions from Jan 1, 2005 to Dec 31, 2005 but it would be nice to set something up so that I could look at any range of dates.
Please help. Thanks.
|
|
|
|
|
Joined: Mar 1999
Posts: 10,504
Adagio Master
|
|
Adagio Master
Joined: Mar 1999
Posts: 10,504 |
Hi Bal,
Use
{TransDate}<=QUERYDATE("Enter starting date",DATE(2005,01,01))
Andrew Bates
|
|
|
|
|
Joined: Mar 1999
Posts: 216
Adagio Ace
|
|
Adagio Ace
Joined: Mar 1999
Posts: 216 |
Thanks very much.
Now I have another question.
I want to look at a list of dockets.
I need to trim the docket numbers.
I have tried: Trim({Docket})="70-97", Trim({Docket})="30-01",
and so on. Only the first docket is reported. What do I do?
Last edited by bal; 11/03/06 05:00 PM.
|
|
|
|
|
Joined: Mar 1999
Posts: 11,763
Adagio Action Team
|
|
Adagio Action Team
Joined: Mar 1999
Posts: 11,763 |
Hi bal,
If you ever want to have 'either this or that' as a list of dockets, you can use the OR function to separate the statements:
OR( Trim({Docket})="70-97", Trim({Docket})="30-01" )
This can get large if you want a list of 10 specific dockets, so alternately you can use the FINDANY function:
FINDANY( Trim({Docket}),"70-97","30-01",...) = 1
FINDANY returns a value of 1 if the first value equals any of the subsequently listed values, others the value is 0.
Regards, Softrak Tech Support
|
|
|
|
|
Joined: Mar 1999
Posts: 216
Adagio Ace
|
|
Adagio Ace
Joined: Mar 1999
Posts: 216 |
I'm really trying to create a view of all time spent during a given period on a specific set of dockets on the same view.
I probably need to use:
AND( Trim({Docket})="70-97", Trim({Docket})="30-01" )
Does that seem right?
Thanks
Last edited by bal; 11/03/06 05:46 PM.
|
|
|
|
|
Joined: Mar 1999
Posts: 216
Adagio Ace
|
|
Adagio Ace
Joined: Mar 1999
Posts: 216 |
If I don't use "TRIM", I can pull information on more than one docket but once I introduce the TRIM, only the first docket is reported.
|
|
|
|
|
Joined: Mar 1999
Posts: 10,504
Adagio Master
|
|
Adagio Master
Joined: Mar 1999
Posts: 10,504 |
Hi bal, It's not the TRIM() that's causing the problem - it's the AND(). A single docket number cannot be equal to BOTH "70-97" AND "30-01" at the same time (which is what AND() is asking). Use:
AND(
{TransDate}<=QUERYDATE("Enter starting date",DATE(2005,01,01)),
OR(
Trim({Docket})="70-97",
Trim({Docket})="30-01"
)
)
to check both the date and docket range.
Andrew Bates
|
|
|
|
|
Joined: Mar 1999
Posts: 216
Adagio Ace
|
|
Adagio Ace
Joined: Mar 1999
Posts: 216 |
I copied and pasted the code into a new filter.
The report only shows 70-97 transactions.
|
|
|
|
|
Joined: Mar 1999
Posts: 216
Adagio Ace
|
|
Adagio Ace
Joined: Mar 1999
Posts: 216 |
This is my the filter I am trying to refine. The problem is that the report only shows 70-97.
AND (
{Trans Date} >= QUERYDATE("Enter start Date",DATE(2005,01,01)) , {Trans Date} <= QUERYDATE("Enter end Date",DATE(2005,01,01)) , {Trans Type Desc} = "Time" ,
{Staff} <>" ADJ" ,
OR( Trim({Docket})="70-97", Trim({Docket})="30-01" )
,
{Non-Billable Category} =" " )
|
|
|
|
|
Joined: Mar 1999
Posts: 10,504
Adagio Master
|
|
Adagio Master
Joined: Mar 1999
Posts: 10,504 |
He bal,
Well, the date defaults select only a single day (and New Year's Day at that), so hopefully you are selecting a broader range of dates.
The "OR" is selecting from only two dockets.
In an "AND()" test, the test FAILS (and no record is selected), when any SINGLE test fails. Add all the fields you are testing to your View, turn the filter off, and see all the records - then turn the filter on an determine why a specific row disappears.
Andrew Bates
|
|
|
|
Forums5
Topics14,681
Posts71,647
Members1,874
| |
Most Online1,408 Dec 9th, 2025
|
|
|
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
|
|
|
|
|
|
|
|
|