void CCFXRequest::SetVariable(LPCSTR lpszName, LPCSTR lpszValue)
Sets a variable in the calling template. If the variable name already exists in the template, its value is replaced. If it does not exist, a variable is created. The values of variables created using SetVariable
can be accessed in the same manner as other template variables (for example, #MessageSent#
).
Parameter | Description |
---|---|
lpszName |
Name of variable |
lpszValue |
Value of variable |
The following example sets the value of a variable named 'MessageSent'
based on the success of an operation performed by the custom tag:
BOOL bMessageSent;
...attempt to send the message...
if ( bMessageSent == TRUE )
{
pRequest->SetVariable( "MessageSent", "Yes" ) ;
}
else
{
pRequest->SetVariable( "MessageSent", "No" ) ;
}