Skip to main content
All CollectionsScripting
Accessing Profile Attributes

Accessing Profile Attributes

Updated over 3 months 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=0
MC_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

Did this answer your question?