Attempting to create a multi-value profile field from widget code and I keep getting the following error:
- Message: "When a multi-valued filed type is specified, there must be at least 1 option or choice specified." [String]
- Type: "ValidationError" [String]
Below is my code, the query string I'm passing in for $fields is:
_ProfileFieldChoices_College Age=College Age&_ProfileFieldChoices_Elementary School Age=Elementary School Age&_ProfileFieldChoices_High School Age=High School Age&_ProfileFieldChoices_Infants and Toddlers=Infants and Toddlers&_ProfileFieldChoices_LSL Intervention 0-3=LSL Intervention 0-3&_ProfileFieldChoices_Middle School Age=Middle School Age&_ProfileFieldChoices_Preschool Age=Preschool Age&_ProfileFieldChoices_Professional Mentoring=Professional Mentoring&_ProfileFieldChoices_School to Workforce Transition=School to Workforce Transition&_ProfileFieldChoices_Support for ESL Families=Support for ESL Families&_ProfileFieldChoices_Support for Vulnerable Families=Support for Vulnerable Families&_ProfileFieldChoices_Teletherapy/Telepractice=Teletherapy Telepractice
#set($interests = $hf_taxonomy.GetAdminChildItems("interests"))
#set ($fields = "")
#foreach($item in $interests)
#if($fields == "")
#set($fields = "${fields}_ProfileFieldChoices_${item.Name}=${item.Key}")
#else
#set($fields = "${fields}&_ProfileFieldChoices_${item.Name}=${item.Key}")
#end
#end
$fields
#set($isSearchableArg = true)
#set($userProfileFieldResponse = $core_v2_userProfileField.Create("Interests", 14, "%{ FieldTypeChoices = $fields, IsSearchable = $isSearchableArg }"))
$userProfileFieldResponse.Errors