Last characters
Function: Last characters
This function helps you extract a specific number of characters from the end of any text you provide. It's useful for tasks like getting file extensions, the last digits of an ID, or a short preview of a longer message.
Input
- Text: The original piece of text you want to work with. (Type: STRING, Required)
- Amount of characters: The number of characters you want to take from the very end of the text. (Type: NUMBER, Required)
Output
- Result: The portion of the original text containing the specified number of characters from the end. This value will be available in a variable named "Result" (or whatever custom name you provide) for use in later steps. (Type: STRING)
Execution Flow
Real-Life Examples
Example 1: Extracting a File Extension
Imagine you have a list of file names and you want to quickly get their extensions.
- Inputs:
- Text: "report_q3_2023.pdf"
- Amount of characters: 3
- Result: "FileExtension"
- Result: A new variable named
FileExtensionwill be created, containing the text "pdf".
Example 2: Getting the Last Digits of an Order ID
Suppose your order IDs are structured like "ORD-2024-00012345" and you only need the last few unique digits.
- Inputs:
- Text: "ORD-2024-00012345"
- Amount of characters: 8
- Result: "UniqueOrderID"
- Result: A new variable named
UniqueOrderIDwill be created, containing the text "00012345".
Example 3: Creating a Short Message Preview
You have a long customer message and want to display a short preview in a notification.
- Inputs:
- Text: "Thank you for your inquiry. We have received your request and will get back to you within 24 hours."
- Amount of characters: 15
- Result: "MessagePreview"
- Result: A new variable named
MessagePreviewwill be created, containing the text "24 hours.".