Hey folks,
I am having issues with my search formula. I am trying to build retrieve all my closed requests one month ago. I can’t seem to get any results. Here is my formula.
search$ = |Form=“ChangeRequest” & Status=“Closed” & @Adjust(@Today;0;-1;0;0;0;0) = DateClosed
David
Subject: did you close your formula?
At least, you should add some paratheses, and close your formula, like this:
search$ = |Form=“ChangeRequest” & Status=“Closed” & (@Adjust(@Today;0;-1;0;0;0;0) = DateClosed) |
But again, are you sure your are checking dates on the same format? Like date only?
Rune Carlsen
Subject: Query Not Understandable
Rune,
Thanks for your response. I my CloseDate is of Date/Time type so I should be ok, at least I think. I tried using the parenthesis you recommended and am getting a Query Not Understandable message.
Thanks,
David
Subject: Post your complete code, please
Will your code SAVE/compile, or do you get the error during execution?
Rune Carlsen
www.rune.no
Subject: Try This…
Try this:Dim dateTime as New NotesDateTime( Today )
Call dateTime.AdjustMonth(-x)
newDate$ = dateTime.DateOnly
search$ = |Form = “CR” & Status = “Closed” & CloseDate = [| & newDate$ & |]|
Using script, this will take today’s date minus x. At which point, you could insert into your code inside the and all should be fine.