1 / 14

String Manipulation and Calculated Columns Workshop

Learn string manipulation techniques, such as concatenation and substrings, as well as working with multi-values and arrays in calculated columns. Also covers date formatting and comparison. September 12-14, 2018 in Raleigh, NC.

janiceb
Download Presentation

String Manipulation and Calculated Columns Workshop

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. September 12-14, 2018 Raleigh, NC

  2. Commonly Used Calculated Columns Cameron Blashka | Entrinsik Inc. | September 12, 2018

  3. Overview • String Manipulation • Concatenation • Substrings • MultiValue and Arrays • Searching for Specific Values • Associated Values • Dates • Formatting • Comparison • Time Between

  4. String Methods • concat() • substr() • toUpperCase() • toLowerCase() • trim() • indexOf()

  5. String Manipulation – Concatenation First Name + Last Name firstName + “ “ + lastName

  6. String Manipulation - Substrings • First three characters + class description sectionCode.substr(0,3)+":"+cOURSE_assoc_crsTitle

  7. String Manipulation - indexOf • Creating a Username var firstInitial = firstName.substr(0,1); var firstInitialLower = firstInitial.toLowerCase(); var lastLower = lastName.toLowerCase(); var lastSpace = lastLower.indexOf(" "); if(lastSpace > -1){ firstInitialLower+ lastLower.substr(0,lastSpace) } else{ firstInitialLower+lastLower; }

  8. MultiValues and Arrays If a Specific Value Exists Lowest Value Highest Value var arr = fieldAlias; var highest = arr[0]; for(i=1;i<arr.length;i++){ if(arr[i] > highest){ highest = arr[i]; } } highest; var arr = fieldAlias; var lowest = arr[0]; for(i=1;i<arr.length;i++){ if(arr[i] < lowest){ lowest = arr[i]; } } lowest; var arr = fieldAlias; if(arr.indexOf(“value”)>-1){ “Value exists”; } else{ “Value does not exist”; }

  9. MultiValues and Arrays • Associated Values

  10. Date Formatting • Year - date.getYear()+1900 • Month - date.getMonth()+1 • Date - date.getDate() var sdf = new java.text.SimpleDateFormat(“MM-dd-yy”) sdf.format(date)

  11. Date Comparison

  12. Time Between

  13. Any Questions? Thanks!

  14. Further Reading • String Methods https://www.w3schools.com/js/js_string_methods.asp • Array Methods https://www.w3schools.com/js/js_array_methods.asp • Date Methods https://www.w3schools.com/js/js_date_methods.asp • Informer 4 Help Center – Calculated Columns https://entrinsikincraleigh.zendesk.com/hc/en-us/sections/200412537-Calculated-Columns

More Related