Kinook Software Forum

Go Back   Kinook Software Forum > Ultra Recall > [UR] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-23-2005, 03:56 PM
vamp07 vamp07 is online now
Registered User
 
Join Date: 01-05-2005
Posts: 38
Using AND and OR

I want to build a search that says give me all items where (FollowUp = yes and there is no DueDate) OR (FollowUp = Yes and Due date is less than or equal to TODAY). Can this be done? I don't see how to construct it without parenthesis.

Thanks
Reply With Quote
  #2  
Old 05-23-2005, 05:51 PM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
Yes this can be done, basically indenting in the Search Criteria Grid (in the Advanced Search interface) provides the equivalent of parantheses.

All rows at the same indent level have the same precedence (are grouped together). So to group certain criteria together, simply indent them to the same indent level.

You can indent with the arrow keys in the Item Toolbar or the Move Up/Down/Left/Right entries in the Item menu...
Reply With Quote
  #3  
Old 05-23-2005, 06:49 PM
vamp07 vamp07 is online now
Registered User
 
Join Date: 01-05-2005
Posts: 38
Got it working but it's not obvious to me. How would you read this with parens?

------FollowUp=yes
AND Parent Title <> TEMPLATES
------OR DueDate=""
------OR DueDate>=TODAY



What confuses me is that first OR. I switched it to an AND and got the same results. The first AND/OR of an indent is irrelevant?
Reply With Quote
  #4  
Old 05-23-2005, 09:15 PM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
If I correctly understand the 1st, 3rd and 4th rows to be indented one level, the following should be the boolean logic employed:

ParentTitle <> TEMPLATES AND (FollowUp=yes or DueDate="" or DueDate>=TODAY)
Reply With Quote
  #5  
Old 05-23-2005, 09:46 PM
vamp07 vamp07 is online now
Registered User
 
Join Date: 01-05-2005
Posts: 38
I did not do a good job posting that. 1st and 2nd line are not indented and line 3,4 are indented 1 to the right. I need to show AND but those two first lines are not indented.

Here it is again:

--------FollowUp=yes
AND --Parent Title <> TEMPLATES
---------------OR DueDate=""
---------------OR DueDate>=TODAY
Reply With Quote
  #6  
Old 05-23-2005, 10:16 PM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
In that case, the logic used by the search would be:

(FollowUp=yes AND ParentTitle <> TEMPLATES) OR (DueDate="" OR DueDate >= TODAY)

which is the logical equivalent of:

(FollowUp=yes AND ParentTitle <> TEMPLATES) OR DueDate="" OR DueDate >= TODAY

You initially said you wanted to achieve this: "... where (FollowUp = yes and there is no DueDate) OR (FollowUp = Yes and Due date is less than or equal to TODAY)".

To obtain this logic you should construct your search like this:

FollowUp=yes
AND DueDate =""
OR <indent 1> FollowUp=Yes
AND <indent 1>DueDate <= TODAY

or the similar (but equivalent)

FollowUp=yes
AND <indent 1> DueDate NOT EXISTS
OR <indent 1> DueDate = ""
OR <indent 1> DueDate <= TODAY

The AND or OR for the first row at a new indent level determines how the expression represented by that indent level is evaluated related to the other indent levels... Hope that helps. [We'll work on the help file to try to make this clearer for future users!]

Note: The last suggestion also handles the situation where a Followup attribute is assigned (to an Info Item), but no DueDate attribute is even assigned (not sure if this is necessary for your data or not).
Reply With Quote
  #7  
Old 05-24-2005, 07:50 AM
vamp07 vamp07 is online now
Registered User
 
Join Date: 01-05-2005
Posts: 38
Thanks Kevina,

1. Two things, The first OR/AND after the indent I don't think works as you stated. I think it is always an AND even if you set it as an OR. I did some tests and changed it to and OR and that should have given me many more results but it gave me the same results as an AND.

2. Most people are going to be confused by this indenting scheme to set up logic. I think if you insert parenthesis into the builder as you indent it might make is easier or just use the space below the tree to show a classic logic expression of what the tree will end up doing. I did not even look in the help because it never occurred to me that indentation might be possible.
Reply With Quote
  #8  
Old 05-24-2005, 09:15 AM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
You are correct that an OR relationship of the first criteria row of an indent level is not honored as I explained.

This is a bug and will be addressed in the upcoming minor release. Thanks for reporting it.
Reply With Quote
  #9  
Old 06-06-2005, 01:47 PM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
Version 1.3 of Ultra Recall has been released, which fixes this reported bug.
Reply With Quote
  #10  
Old 06-06-2005, 04:16 PM
vamp07 vamp07 is online now
Registered User
 
Join Date: 01-05-2005
Posts: 38
Thanks!!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 09:16 PM.


Copyright © 1999-2023 Kinook Software, Inc.