February 11-13, 2019 Raleigh, NC
Informer 4: Creating and Using Functions Presenter: Sarah Rodger Informer Support Specialist
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
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)
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
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
Total Numeric Multivalues Format Dates Combining Text Fields I4: Function Examples Total Numeric Multivalues Format Dates Combining Text Fields
I4 Functions: Total Multivalues
I4 Functions: Format Dates
I4 Functions: Combine Text Fields
I4: Using Functions New Calculation > Script > Function Icon
I4: Using Functions Click to Select Parameters from drop down menus
I4 Using Functions Creates this column…
I4 Functions: Live Demo Use Cases: Creating a Hyperlink from a URL totalMV formatDate
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
I4 Functions: More Info You can download a package of functions: Informer Functions Package (Import Functions to Use with Calculated Columns) Here: http://delivery.entrinsik.com/support/informer/downloads/index.php 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
I4 Functions: Help See Help Center Article: Report for Scheduled Report details - including Email 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
Thank you! Any Questions? Informer 4 Overview Thank you! Any Questions?
February 11-13, 2019 Raleigh, NC