ERROR... can't use Selection Criteria...Related Table Fields and Parenthesis

 4 Replies
 0 Subscribed to this topic
 1 Subscribed to this forum
Sort:
Author
Messages
FireGeek21
Veteran Member Send Private Message
Posts: 84
Veteran Member
Hi Everyone,

We are receiving the following error when attempting to create output using MS Addins:

ERROR. You cannot use Selection Criteria that contains both Related Table Fields and Parenthesis.

Not sure how to resolve this...

We are building output to include the following:

-Dependent's Name
-Benefit Plan Type (HL; DN)
-Benefit Start-Date
-Benefit Stop-Date
-Dependent's Relationship
-Dependent's Consent
-Employee's Date of Hire
-Employee's Name
-Employee's Company

The Start-Date needs to be >= 01/01/2010 and where we are putting () is with the Stop-Date:

(ISNULL(Stop-Date) or Stop-Date > CurrentDate)

Any idea on how to resolve this error?

Thank,

RSGeek
Deleted User
New Member Send Private Message
Posts: 0
New Member
I literally just ran into that same error message 2 weeks ago, and assumed that it's one of those "hidden" limitations within the Add ins. Instead of using the parentheses, can you just put in "or" logic - your first grouping having stop date = blank, then the next grouping stop date > current date?
FireGeek21
Veteran Member Send Private Message
Posts: 84
Veteran Member
I figure I would have to somehow group the criteria considering I also need the Start-Date >= 01/01/2010. This is what I am picturing I have to do but am getting this error.

Start-Date >= 01/01/2010 AND
(IsNull(Stop-Date) or Stop-Date >= Current Date)

Aurgh!
Deleted User
New Member Send Private Message
Posts: 0
New Member
Sorry I wasn't clear - I'm suggesting not using the grouping function, but using and/or -
Start date >01/01/2010 AND stop date = null
OR
start date > 01/01/2010 AND stop date > 06/14/2010
FireGeek21
Veteran Member Send Private Message
Posts: 84
Veteran Member
Thank you Stephanie for the suggestion. Here is the final result - and I was able to group!!!

((Start-Date >= 01/01/2010 AND
Stop-Date = 00000000)) OR
((Start-Date >= 01/01/2010 AND
Stop-Date >= 06/14/2010))

It appears the problem lied with the table I started with. MS Add-ins won't allow you to use any selection criteria against a "related" table, however you can against the table you start with. In the end, I started with the HRDEPEND table and related to EMPLOYEE and EMDEPEND. Originally I was starting with the EMDEPEND table and related to EMPLOYEE, HRDEPEND and BENEFIT - criteria against the HRDEPEND or the BENEFIT tables were not working.

All is better!!! Thanks again for the suggestion.

FireGeek