Skip to main content

Accessing Profile Attributes

Updated over 3 weeks ago

Text type profile attribute

--To fetch value of profile attribute for the participant
OpenP=getProfileAttribute("Text_Profile_Attr")
OpenP.Value -- Returns Hello World

Numeric type profile attribute​

--To fetch value of profile attribute for the participant
OpenN=getProfileAttribute("Numeric_Profile_Attr")
OpenN.Value -- Returns 3.6

Single choice profile attribute

--To fetch value of profile attribute for the participant
SC_PA=getProfileAttribute("Single_Choice_Profile_Attr")
SC_PA.Value.Text -- returns Choice 1
SC_PA.Value.Code -- returns 1
i=0
SC_PA.Choices[i].Text -- returns Choice 1
SC_PA.Choices[i].Code -- returns 1

Multiple choice profile attribute

--To fetch value of profile attribute for the participant
MC_PA=getProfileAttribute("Multiple_Choice_Profile_Attr")
MC_PA.Value -- returns the value object
MC_PA.Vale[0].Text -- returns text value
MC_PA.Value[0].Code -- returns code value
i=0MC_PA.Value[i].Text --returns Choice 1
MC_PA.Value[i].Code --returns 1
i=0
MC_PA.Choices[i].Text -- returns Choice 1
MC_PA.Choices[i].Code --returns 1

Accessing System Attributes

System attributes can be accessed using getProfileAttribute() function.
​

Label

Type

Syntax

EmailAddress

Email address

a=getProfileAttribute("EmailAddress").Value

-- returns string value

PhoneNumber

Phone number

a=getProfileAttribute("PhoneNumber").Value

-- returns string value

RecontactMethod

Single choice

a=getProfileAttribute("RecontactMethod").Value

-- returns string value

SubscribedAt

Date and time

a=getProfileAttribute("SubscribedAt").Value

-- returns string value

SubscriptionEndedAt

Date and time

a=getProfileAttribute("SubscriptionEndedAt").Value

-- returns string value

SubscriptionStatus

Single choice

a=getProfileAttribute("SubscriptionStatus").Value

-- returns object

TimeZone

Text

a=getProfileAttribute("EmailAddress").Value

-- returns string value

Did this answer your question?