SetContentString method: Message class
Syntax
SetContentString(string)
Description
Use this method to set the content for the message segment for a non-rowset-based message only.
Note:
An error will occur if SetContentString is used with other message types, such as rowset-based messages, document-based messages, and so on.
Parameters
| Parameter | Description |
|---|---|
|
string |
Specifies the content of the message segment. |
Returns
A Boolean value: True if the message segment was updated, False otherwise.
Example
Local Message &MSG;
Local Document &DOC;
Local Compound &COM, &COM1;
&MSG = CreateMessage(Message.QE_WEATHERSTATION_POST);
&DOC = &MSG.GetURIDocument();
&COM = &DOC.DocumentElement;
&COM.GetPropertyByName("state").Value = "Washington";
&COM.GetPropertyByName("city").Value = "Redmond";
&COM.GetPropertyByName("day").Value = "today";
&COM.GetPropertyByName("week").Value = "first";
&COM.GetPropertyByName("year").Value = "2010";
&COM.GetPropertyByName("country").Value = "USA";
&MSG.URIResourceIndex = QE_FLIGHTDATA.QE_ACNUMBER;
&DOC = CreateDocument("Weather", "WeatherData", "v1");
&COM1 = &DOC.DocumentElement;
&COM1.GetPropertyByName("city").Value = "Troutlake";
&STR1 = %IntBroker.GetURL("WEATHERSTATION_DATA", 2, &DOC);
&strHTML = GetHTMLText(HTML.WEATHER_CITIES, &STR1);
&bRet = &MSG.SetContentString(&strHTML);
Related Topics