Download presentation
Presentation is loading. Please wait.
1
February 11-13, 2019 Raleigh, NC
2
Informer 4: Creating and Using Functions
Presenter: Sarah Rodger Informer Support Specialist
3
I4: Why Functions? Avoid… Easier for end users
Reduces need for copy-pasting code Consistent results/everyone does it the same way Make changes in one place instead of each report
4
I4: How to Create Functions
Need JavaScript knowledge Mappings > Functions > Add Function Almost same code as calculated script columns except: Pass Parameters Use Return statements (missing returns are the #1 mistake)
5
I4: Function Parameters
Use Parameters in the place of Column Aliases Specify the Parameter’s Data Type Label: a prompt to the user for parameters
6
I4: Function Error Checking
Provide error checking Check for null values Check for valid ranges You can’t be sure what users will pass in via the parameters
7
Total Numeric Multivalues Format Dates Combining Text Fields
I4: Function Examples Total Numeric Multivalues Format Dates Combining Text Fields
8
I4 Functions: Total Multivalues
9
I4 Functions: Format Dates
10
I4 Functions: Combine Text Fields
11
I4: Using Functions New Calculation > Script > Function Icon
12
I4: Using Functions Click to Select Parameters from drop down menus
13
I4 Using Functions Creates this column…
14
I4 Functions: Live Demo Use Cases: Creating a Hyperlink from a URL
totalMV formatDate
15
I4 Functions: More Info You can package Functions
They are schema independent You can search for reports that use a function via the “Calculated Column Audit” report found here: Download Informer Mappings and Package of Reports
16
I4 Functions: More Info You can download a package of functions: Informer Functions Package (Import Functions to Use with Calculated Columns) Here: The package includes: leftPadDecimal, newArrayOfObjects, sortArrayDesc formatDateArray, formatDate, MaxValueOfArray newArrayOfDecimals, sortArrayAsc, newArrayOfText sumAnArray, AverageOfValuesOfArray, CountDaysBetweenDates reportLink, rightPadDecimal, map, MaskSSN, staticDate newArrayOfIntegers, firstValueOfArray, newArrayOfDates lastValueOfArray, returnNthValueInArray, MinValueOfArray
17
I4 Functions: Help See Help Center Article: Report for Scheduled Report details - including Addresses for a list of Scheduler Functions Download the Informer JavaScript Guide for more on Informer Javascript and detail on creating functions. See Help Center page: Training and User Guides
18
Thank you! Any Questions?
Informer 4 Overview Thank you! Any Questions?
19
February 11-13, 2019 Raleigh, NC
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.