Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CR8.5 - Record selection syntax

Status
Not open for further replies.

KWatson51

IS-IT--Management
Oct 28, 2003
3
US
I need to "group" some parameters in my record selection
where these first 3 lines are evaluated:

{Project.Completed} = "F" and
{Project.FinishDate} <= Date (2003, 12, 31) and
{Client.OfficeID} <> &quot;DROP&quot;

AND
these 2 lines are evaluated:

{Client.Manager} = &quot;PAP&quot; or
{Client.Partner} = &quot;PAP&quot;

I know there is a way, but I don't know what the syntax is.
Your expertise would be appreciated.
...keith
 
Try:

{Project.Completed} = &quot;F&quot; and
{Project.FinishDate} <= Date (2003, 12, 31) and
{Client.OfficeID} <> &quot;DROP&quot; and
({Client.Manager} = &quot;PAP&quot; or
{Client.Partner} = &quot;PAP&quot;)

But none of these are parameters--parameters are indicated by {?yourparameter}. Do you have parameters you are trying to set up here? If so, please identify them, their data type, and whether they are discrete, multiple, or range values.

-LB
 
and to add....if any of them are parameters then they will not affect record or group selection since they are not related to any fields in the database

Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
Actually, I do have it set up for a user prompt (parameter) as below:
{Project.Completed} = &quot;F&quot; and
{Project.FinishDate} <= Date (2003, 12, 31) and
{Client.OfficeID} <> &quot;DROP&quot;
and
{Client.Manager} = {?MgrPrompt} or
{Client.Partner} = {?DirPrompt}

(These 2 tables are joined and the parameters are related to fields in the &quot;client&quot; database).

However, when I try to add the &quot;(&quot; and &quot;)&quot;, these are not saved when I save the formula.
 
They're just not saved, or you get an error?

It should save it, if not, try changing their placement to:

(
{Client.Manager} = {?MgrPrompt}
or
{Client.Partner} = {?DirPrompt}
)
and
(
{Project.Completed} = &quot;F&quot;
)
and
(
{Project.FinishDate} <= Date (2003, 12, 31) and
)
and
(
{Client.OfficeID} <> &quot;DROP&quot;
)

-k
 
Thanks...
That seems to have worked.
(I was not getting errors, it just wasn't saving.)
...keith
 
Good to read.

I have a FAQ which addresses record selection formulas here:

faq767-3825

I use parentheticals liberally to help assure that the data is passed to the database, and to make sure that the logic is correct.

Always check the Database->Show SQL Query to make sure that all of the criteria is passed along to the database.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top