Download presentation
Presentation is loading. Please wait.
Published byLorena Ryan Modified over 7 years ago
1
Introduction to Calculated Columns Variables, Conditionals, and String Manipulation
PRESENTER: Cameron Blashka| Informer Implementation Specialist| April 27, 2017
2
Overview Template vs. Script Objects and Variables Template Examples
Concatenation JavaScript Concepts Script Examples Seats Available Color Coding String Manipulation
3
Creating a Calculated Column
4
Template v. Script Templates Scripts Written with plain text or HTML
Used for formatting pre-existing data Scripts Written with JavaScript Used for manipulating the data in some way
5
Template Concatenation
6
Template Concatenation
Drag and Drop into the Expression Box ${firstName} ${lastName} Creates:
7
JavaScript Concepts – Objects and Variables
What is an Object? Objects have a certain data type Similar data types interact with one another
8
JavaScript Concepts – Objects and Variables
Data Type Example Numeric 1037, 0, 0.05, -157 String ‘Hello!’ ‘’, ‘5’ Boolean True, False Date 12/25/2000, Multi-value [‘one’,’two’,’three’]
9
JavaScript Concepts – Objects and Variables
What is a variable Naming a variable Assigning values to a variable var myVariable; var myVariable = true var myVariable = 5; Var myVariable = “5”
10
JavaScript Concepts – Arithmetic Operators
Function = Assign value + Addition / Concatenation - Subtraction * Multiplication / Division % Modulo (Remainder)
11
JavaScript Concepts – Conditionals
Used when you want an output to change based off of the value of something else Two types If/Else statement Switch statement
12
JavaScript Concepts – Conditionals
Operator Function == Is equal to != Is not equal to > Is greater than < Is less than >= Is greater than or equal to <= Is less than or equal to && And || Or ! Not
13
JavaScript Concepts – Conditionals
If Statement Switch Statement if(condition){ statement; } else if(condition2){ else{ switch (n){ case value1: break; case value2: default:
14
Script #1 – Seats Available
15
Script #1 – Seats Available
Subtract the two columns from one another
16
Script #2 – Color Coding
17
Script #2 – Color Coding Assign HTML styling based on some condition
18
String Manipulation String types have special functions that work with all strings string.function()
19
String Manipulation length concat() substr() toUpperCase()
toLowerCase() trim() indexOf()
20
Script #3 – String Manipulation
21
Script #3 – String Manipulation
Don’t forget edge cases Multiple ways to accomplish the same thing
22
Resources HTML JavaScript CSS (styles)
JavaScript CSS (styles)
23
Thank you! Any questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.