First characters
Function: First characters
This function helps you extract a specific number of characters from the beginning of any text. It's useful for shortening descriptions, creating previews, or standardizing data by taking only the initial part of a longer text.
Input
- Text: The original piece of text you want to work with. (Type: STRING)
- Amount of characters: The number of characters you want to extract from the very beginning of the text. (Type: NUMBER)
Output
- Result: The extracted characters from the beginning of your text. This will be stored in a variable that you name, which you can then use in subsequent steps. (Type: STRING)
Execution Flow
Real-Life Examples
Here are some ways you can use the "First characters" function in your applications:
-
Example 1: Creating a short preview for an article. You have a long article title and want to display a shorter version in a list or notification.
- Inputs:
- Text: "The Comprehensive Guide to Building No-Code Applications in 2024"
- Amount of characters: 25
- Result (variable name):
ArticleSnippet
- Result: The variable
ArticleSnippetwill contain "The Comprehensive Guide to".
- Inputs:
-
Example 2: Extracting a product category code from an item ID. Your product IDs always start with a specific category code, and you need to isolate it for filtering or reporting.
- Inputs:
- Text: "ELEC-SMARTPHONE-XYZ789"
- Amount of characters: 4
- Result (variable name):
ProductCategory
- Result: The variable
ProductCategorywill contain "ELEC".
- Inputs:
-
Example 3: Generating initials from a user's full name. You want to display a user's initials in a profile picture placeholder or a quick summary.
- Inputs:
- Text: "John Doe"
- Amount of characters: 1
- Result (variable name):
FirstNameInitial
- Result: The variable
FirstNameInitialwill contain "J".
- Inputs: