NetScript Functions
Aggregate functions
Aggregate functions summarize many rows into one value, such as total revenue. Use them to turn row-level data into metrics in a formula.
Boolean and conditional logic functions
Boolean and conditional logic functions compare values and return results based on conditions. Use them to filter data, such as orders from one region, or to label rows with different values.
Math functions
Math functions calculate numeric values in a formula, such as revenue per order or a rounded average. Use them to combine metrics and format numeric results.
Series functions
Series functions compare each row with the rows around it, such as the change in daily event counts. Use them to calculate running totals, moving averages, and period-over-period changes.
Query operations
Query operations shape the result of a NetScript expression. Use them to group, filter, and calculate moving totals, and to set parameters such as the time grain.
String functions
String functions create, combine, search, and transform text values. Use them to clean up text properties, such as page names, or to match text patterns.
Time functions
Time functions work with timestamps, time intervals, and time ranges in a formula. Use them to filter events to a period, group data by day or month, or measure durations.
JSON functions
JavaScript Object Notation (JSON) functions read values from JSON columns, such as event properties stored as JSON. Use them to pull a single field or array item into a formula.
Utility functions
Utility functions convert values between data types and work with grouped results. Use them to cast a value to a number, supply a fallback value, or read a grouping property.