Shorten String Transform


:spiral_notepad: Description This transform returns up to the first X characters of the specified string. This is useful for situations where the string may contain fewer characters than the specified length, which currently causes an error with the existing substring primitive.
:balance_scale: Legal Agreement By using this CoLab item, you are agreeing to SailPoint’s Terms of Service for our developer community and open-source CoLab.
:hammer_and_wrench: Repository Link colab-transforms/transforms/shorten-string at main · sailpoint-oss/colab-transforms · GitHub
:open_book: New to Transforms in the CoLab? Read the getting started guide for Transforms in the CoLab.
:hospital: Supported by Community Developed

Overview

This transform returns up to the first X characters of the specified string. This is useful for situations where the string may contain fewer characters than the specified length, which currently causes an error with the existing substring primitive.

Requirements

An existing value that you want only the first part of. This can be an identity attribute, an account attribute, or a value generated from another transform.

Guide

To use this transform, modify the attribute being referenced to point to the desired target (an identity attribute, an account attribute, or a value generated from other transforms), and update the $length value specified on Line 11 to reflect the desired length.

1 Like