MESSAGE_SEARCH ​
The command MESSAGE_SEARCH searches all messages for the given expression.
Syntax ​
leo-grammar
CC "Application" MESSAGE_SEARCH strValue
#--> RESULT ecode:intValue messageids:strValue
Parameters ​
<main-parameter>
(strValue) -
Returns ​
ecode
(intValue) - contains the error code or is 0 in case of success.messageids
(strValue) - contains a list with the IDs of the found messages.
Details ​
The string is interpreted as a regular expression and is searched in the DATA part of its message.
See Also ​
Examples ​
Search all messages in the DB for the string "Brief schreiben" appearing at the start of the DATA part of the message.
leo-grammar
CC "Application" MESSAGE_SEARCH "^Brief schreiben"
IF (ecode = 0)
{
SET n: (tokcnt (messageids, " "))
IF (n = 0)
{
CC "AdoScript" INFOBOX "No messages found!"
}
ELSIF (n = 1)
{
CC "AdoScript" INFOBOX ("There is one message fulfilling the entered search criteria:\n\n" + messageids)
}
ELSE
{
SET str:""
FOR id in:(messageids)
{
SET str: (str + "\n" + id)
}
CC "AdoScript" INFOBOX ("There are " + STR n + " messages fulfilling the entered search criteria:\n" + str)
}
}
ELSE
{
CC "AdoScript" ERRORBOX "An error occured while searching messages!"
}
Versions and Changes ​
Available since ADOxx 1.3