SetObjectProperty
Overview
Sets a value for an object created by the CreateObject function.Syntax
SetObjectProperty(1, 2, 3)
| Ordinal | Type | Description | |
|---|---|---|---|
| 1 | object | Required | API object receiving assigned value |
| 2 | string | Required | Name of property assigned |
| 3 | string | Required | Value of property assigned |
Usage
The following example creates an API object named 'Subscriber' and gives it the 'EmailAddress' property with the value of an email address.
SET @subscriber=CreateObject('Subscriber')
SetObjectProperty(@subscriber,'EmailAddress','user@example.com')
The following example creates an API object named 'Attribute', gives it a name of 'First Name', and sets the value to John.
SET @attribute=CreateObject(Attribute)
SetObjectProperty(@attribute,'Name','First Name')
SetObjectProperty(@attribute,'Value','John')