Discussion:
Search message by ID
(too old to reply)
scalello
2006-04-11 12:53:16 UTC
Permalink
Hi, Im ussing the API to get the Appointments and task from GroupWise. now
I need make a Search by primary ID, But I dont know What is the name of the
Field. If I make the search "(MESSAGE_ID= '+s+')'", the API raise error.
"Field Spected" can you helpme?

This is the complete Expression:

Query.Expression:='(Message ID='+s+')';

Where S the String Var where I have stored the ID to the document.

Im developping in Delphi 5, and GW Version is 6.x

Thanks and Regards.

Santiago
David Tracy
2006-04-11 16:33:24 UTC
Permalink
I assume you are using the GroupWise Object API. A search in the Object API,
using either the Query object or one of the Find methods off the Messages or
MessageList objects, can not use the Message ID as part of the search
expression. The only way to retrieve a specific message using a Message ID
is to use the Item method on the Messages or MessageList object. Set the
Message ID as the BString component of the Variant first parameter, then
call the Item method. If the Messages collection contains the corresponding
message, it will be returned; otherwise an error will be sent back.
Post by scalello
On Tuesday, April 11, 2006 at 6:53 AM, in message
Hi, Im ussing the API to get the Appointments and task from GroupWise. now
I need make a Search by primary ID, But I dont know What is the name of the
Field. If I make the search "(MESSAGE_ID= '+s+')'", the API raise error.
"Field Spected" can you helpme?
Query.Expression:='(Message ID='+s+')';
Where S the String Var where I have stored the ID to the document.
Im developping in Delphi 5, and GW Version is 6.x
Thanks and Regards.
Santiago
scalello
2006-04-11 18:01:00 UTC
Permalink
Thanks David.
After get the MEssagelist, Wich is the Field name to serch by ID?

Thanks And Regards.
Post by David Tracy
I assume you are using the GroupWise Object API. A search in the Object API,
using either the Query object or one of the Find methods off the Messages or
MessageList objects, can not use the Message ID as part of the search
expression. The only way to retrieve a specific message using a Message ID
is to use the Item method on the Messages or MessageList object. Set the
Message ID as the BString component of the Variant first parameter, then
call the Item method. If the Messages collection contains the corresponding
message, it will be returned; otherwise an error will be sent back.
Post by scalello
On Tuesday, April 11, 2006 at 6:53 AM, in message
Hi, Im ussing the API to get the Appointments and task from GroupWise. now
I need make a Search by primary ID, But I dont know What is the name of the
Field. If I make the search "(MESSAGE_ID= '+s+')'", the API raise error.
"Field Spected" can you helpme?
Query.Expression:='(Message ID='+s+')';
Where S the String Var where I have stored the ID to the document.
Im developping in Delphi 5, and GW Version is 6.x
Thanks and Regards.
Santiago
David Tracy
2006-04-12 20:45:39 UTC
Permalink
There is no field name to use when searching by message ID. The Message ID
is simply passed to the MessageList::Find() method as the 1st parameter. For
example, if I had a BString with the Message ID inside and a MessageList
object, I would make the following call in Visual Basic 6 code:

DIM vFirstParm as Variant
DIM gwMsg as Message

vFirstParm = bstrMessageID
set gwMsg = gwMsgList.Item( vFirstParm )
Post by scalello
Post by David Tracy
On Tuesday, April 11, 2006 at 12:01 PM, in message
Thanks David.
After get the MEssagelist, Wich is the Field name to serch by ID?
Thanks And Regards.
Post by David Tracy
I assume you are using the GroupWise Object API. A search in the Object
API,
Post by David Tracy
using either the Query object or one of the Find methods off the
Messages or
Post by David Tracy
MessageList objects, can not use the Message ID as part of the search
expression. The only way to retrieve a specific message using a Message
ID
Post by David Tracy
is to use the Item method on the Messages or MessageList object. Set the
Message ID as the BString component of the Variant first parameter, then
call the Item method. If the Messages collection contains the
corresponding
Post by David Tracy
message, it will be returned; otherwise an error will be sent back.
On Tuesday, April 11, 2006 at 6:53 AM, in message
Hi, Im ussing the API to get the Appointments and task from GroupWise.
now
I need make a Search by primary ID, But I dont know What is the name of
the
Field. If I make the search "(MESSAGE_ID= '+s+')'", the API raise
error.
Post by David Tracy
"Field Spected" can you helpme?
Query.Expression:='(Message ID='+s+')';
Where S the String Var where I have stored the ID to the document.
Im developping in Delphi 5, and GW Version is 6.x
Thanks and Regards.
Santiago
Loading...