What is wrong with this database search query?

125 pts.
Tags:
Database query
Lotus Domino
lotus notes 7.2 error
Lotus Notes Database
Lotus Notes Domino
searchStr =|FIELD Form =Form1  & FIELD CallsBeginDate >= | &  Trim(Cdat(doc.DeleteStartDate(0))) &  |  &  FIELD CallsEndDate <= | &  Trim(Cdat(doc.DeleteEndDate(0))) & | & FIELD Team =| & Trim(doc.OnCallTeam(0))&||

I have used with NotesDocumentCollection.

Thanks for any feedback

 



Software/Hardware used:
Lotus Notes Domino 7.2
ASKED: July 29, 2010  6:44 PM
UPDATED: August 3, 2010  8:01 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Read up on the use of the FIELD keyword. It doesn’t do what you think it does. Take it out of the entire formula.

Also, I am not sure about if this is doing what you want “Trim(Cdat(doc.DeleteStartDate(0)))”. You can test that by creating variables for testing and seeing what each part of this does – for instance, is doc.deletestartdate(0) a string that can be converted to date-time with Cdat? What does Trim take out of the converted date? If there is extraneous text that needs to be removed from doc.deletestartdate(0), it seems Trim should be applied inside of Cdat. Lots going on there that needs to be looked at, I would think.

Finally,

Before using a formula in a script, test it as a view formula. When you have a view formula that work, convert it for use in the script, subsituting variables as needed, as you are doing in this instance.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • BruceWayne
    Hi You should use form name in quote like this : searchStr = | FIELD Form = "Form1" & FIELD CallsBeginDate >= | .... and if "Form1" is a variable it should be : searchStr = | FIELD Form = "| + Form1 + |" & FIELD CallsBeginDate >= | ....
    4,110 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following