Report templatesFunctions
appCode
Extract the application code from a pipe-delimited string
Usage
The appCode
function extracts the first part of a pipe-delimited string, typically used to get application codes from formatted strings.
Syntax
{input | appCode}
Parameters
input
(string): A pipe-delimited string (e.g., "APP001|Application Name")
Returns
The trimmed first part of the string before the pipe character
Examples
Basic extraction
{"APP001|Customer Portal" | appCode}
// Returns: "APP001"
With spaces
{"WEB-002 | E-commerce Platform" | appCode}
// Returns: "WEB-002"
No pipe character
{"STANDALONE" | appCode}
// Returns: "STANDALONE"
Multiple pipes
{"API-003|Payment Gateway|Production" | appCode}
// Returns: "API-003"
Application identifiers
{application.full_name | appCode}
// Extracts application code from full name
System references
{"SYS-101|Authentication Service|v2.0" | appCode}
// Returns: "SYS-101"
Use Cases
- Extracting application identifiers from formatted strings
- Parsing system codes from descriptive text
- Building reference tables with codes only
- Creating cross-references in reports
- Filtering or grouping by application code
Related Functions
withoutAppCode
- Gets everything after the pipe charactersplit
- More general splitting function with customizable delimiter