Siebel Personalization Administration Guide > Siebel Query Language > Functions >

Profile Functions


Function
Description
GetProfileAttr(`profile')
Returns the profile attribute of the current user.
For example:

GetProfileAttr ('Personal Country')

returns the country of the user.
GetProfileAttr only works for fields explicitly defined in the Personalization Profile business component. GetProfileAttr does not work with system fields, which are not explicitly defined in the business component; it returns a NULL value for them.
An exception is the Id system field. This particular system field is available to GetProfileAttr even though it is not in the Personalization Profile business component.
If this function is called for an MVG, it returns just the primary value of the MVG. For example, if the MVG State has the values CA, MA, and GA, where CA is primary:

GetProfileAttr ('State')

returns CA.
GetProfileAttrAsInt(`profile')
Returns the profile attribute of the current user as an integer.
For example:

GetProfileAttrAsInt ('Age')

returns the age of the user as an integer.
GetProfileAttrAsList (`profile')
Returns the MVG value as a list. It can be used in the EXISTS operator to create expressions that match MVG profile attributes with appropriate Siebel content.
Outside the Exists operator. Returns a comma-separated list of the MVG values. For example, if the MVG State has the values CA, MA, and GA, where CA is primary:

GetProfileAttrAsList ('State')

returns CA, MA, GA.
For a single value field. GetProfileAttrAsList returns the profile attribute value.
Within the EXISTS operator. Returns the value profile attributes in the form expected by the user. For example, the EXISTS operator could be used this way:

EXISTS ([Targeted States] = GetProfileAttrAsList ("State")]

This action would match the MVG business component field Targeted State against the MVG profile attribute State.
GetProfileAttrAsNum (`profile')
Returns the profile attribute of the current user as a number.
For example:

GetProfileAttrAsNum ('Age')

returns the age of the user as a number.
GetProfileAttrAsDate (`profile')
Returns the profile attribute of the current user as a date.
For example:

GetProfileAttr ('Birth Day')

returns the birthday of the user as a date.
GetProfileAttrAsTime (`profile')
Returns the profile attribute of the current user as time.
For example:

GetProfileAttr ('Last Login Time')

returns the last login time of the user as time.
GetProfileAttrAsDateTime (profile_attrib)
Returns the profile attribute of the current user as date and time.
For example:

GetProfileAttr ('Last Login Date')

returns the last login date and time of the user as date and time.
GetProfileAttrAsUtcDateTime (profile_attrib)
Returns the profile_attrib formatted in the UtcDateTime type.
For example:

GetProfileAttrAsUtcDateTime ('Date')

returns date time in UTC format.


 Siebel Personalization Administration Guide 
 Published: 18 April 2003