Setting a profile field default value

Is there any way to set a default profile field value? I am thinking I may have to  do it in a BeforeCreate event

usersApi.Events.BeforeCreate += userArgs =>
{
    userArgs.ProfileFields["Contact_Via_Text "].Value = "true";
};

Parents
  • Hi  , this is a good question. To the best of my knowledge, the configuration of Profile Fields does not include the ability to set a default value for any field type (Text, Radio, Select, etc).

    It looks like you are setting a User's profile field "Contact_Via_Text" to "true" before an Event (the content type, not the automation trigger) is created. 

    Since this is for Users, you could also consider the User.BeforeCreate (for new Users) and User.BeforeUpdate (for existing users) which can set the default value for a user when the User Account is created, or do a check for existing users when they are updated to set the default (unless a value already exists) 

Reply
  • Hi  , this is a good question. To the best of my knowledge, the configuration of Profile Fields does not include the ability to set a default value for any field type (Text, Radio, Select, etc).

    It looks like you are setting a User's profile field "Contact_Via_Text" to "true" before an Event (the content type, not the automation trigger) is created. 

    Since this is for Users, you could also consider the User.BeforeCreate (for new Users) and User.BeforeUpdate (for existing users) which can set the default value for a user when the User Account is created, or do a check for existing users when they are updated to set the default (unless a value already exists) 

Children
No Data