Demo Data Package
Demo Data Package Scenarios
28. Get a Contact's First Name in Camel Case
note the scenario below uses data from the deselect demo data package see docid 5 cozdtg0nwmlmeufrmbz scenario you want to get the first name of your contacts in camel case for your email campaign in order to achieve that, you want to convert only the first character of each record to uppercase, and the rest to lowercase note this scenario uses the feature sql functions, which is available in deselect advanced 1\ input on the selections overview screen, click on new to create a new selection drag deselect demo contacts to the selected data extensions section 2\ output hit the create data extension button, enter a name, eg camel case contacts, and press save select all the fields by clicking on the add all fields button click save data extension click on the delete icon next to the first name field that's mapped to first name now we're going to add a custom value under custom values on the left, click add new value under name, enter first name camel case and hit next choose type apply formula to a field choose type apply any function on the drop down list on the top with the label, field type choose text on the drop down list on the insert function section select concat and click on the insert formula button concat will be used to combine the first uppercase letter with the rest of the lowercase string remove all characters between string2 and the last parenthesis on the inserted function remove string1 and insert the upper function the same way you inserted concat upper is used to convert a string to uppercase your formula should now look like this concat ( upper (string), string2) remove the string parameter of upper and between the parentheses insert the left function left is used to extract only a specific amount of characters out of the whole string, starting at the beginning of the string your formula should now look like this concat ( upper ( left (string, number of chars)), string2) replace the number of chars parameter with the number 1 to only extract the first character remove the string parameter from the left function on the first drop down list on the insert field section with the label data extension select deselect demo contacts on the second drop down list on the insert field section with the label field select the first name click on the insert field button your formula should now look like this concat ( upper ( left (" deselect demo contacts " " first name ", 1)), string2) replace the string2 parameter of concat with the function lower lower is used to convert all the characters of the string to lowercase, apart from the first one replace the string parameter of lower with the function substring substring is used to extract all the characters of the string apart from the first one your formula should now look like this concat ( upper ( left (" deselect demo contacts " " first name ", 1)), lower ( substring (string, start, length))) replace the string parameter of substring with the first name field replace the start parameter with the number 2 replace the length parameter with the len function len is used to get the total number of characters of the string your formula should now look like this concat ( upper ( left (" deselect demo contacts " " first name ", 1)), lower ( substring (" deselect demo contacts " " first name ", 2, len (string)))) replace string parameter of len function with first name field your formula should now look like this concat ( upper ( left (" deselect demo contacts " " first name ", 1)), lower ( substring (" deselect demo contacts " " first name ", 2, len (" deselect demo contacts " " first name ")))) hit save the logic defined above will, for each row, convert the value of the first name column to camel case now that the custom value has been created, we can map it to the field first name by drag and dropping it from the custom values to the first name mapping field 3\ preview when you click run preview on the preview screen, a results table will be shown all records in the first name column will be in camel case