User Manual

Substring

1/8/25
Substring

Substring is an action that allows you to create a new substring by extracting a specific character range from a text on the Kuika platform. This feature is very useful for tasks such as splitting user input, performing text analysis, and manipulating content. For example, the Substring action can be used to extract only the last name from a full name entered by a user or to summarize a specific section of a text. This allows you to perform flexible and targeted operations on the text.

Technical Features

  • Subtext Creation: A subtext of the desired length can be extracted starting from a specific index.
  • Text-Focused Data Management: Enables operations on text content such as form data, user inputs, or system messages.
  • Dynamic Data Processing Support: Dynamic subtexts can be generated by taking parameters from form components, screen inputs, or previous action results.
  • Web and Mobile Application Support: The Substring action is supported in web and mobile applications.

Substring Action Application Steps

  1. Open your project on the Kuika platform.
  2. Select the project you want to work on from the Apps screen.
  3. Open the relevant screen in the UI Design module.
  4. Click on the + ADD ACTION menu in the Properties panel on the right side.
  1. From the + ADD ACTION menu, add the String > Substring action according to the trigger event you want (Initial Actions, OnClick, OnBlur, etc.).
  2. Fill in the following fields in the settings panel that opens:
  • Value: The full text from which the subtitle will be extracted.
  • Starting Index: The position where the subtitle will start (0-based indexing).
  • Count: The number of characters to be included in the subtitle.

These fields can be linked to fixed values, form inputs, or action results via the Symbol Picker.

Usage Scenario: Getting the First 3 Letters of the User Name

In a registration form, you want to take the first 3 letters of the name entered by the user and generate a user code.

Scenario flow:

  • The user enters “John” in the fullname field.
  • In the Substring action:
    • Value: FormComponent.fullname
    • Starting Index: 0
    • Count: 3
  • The action result returns “Joh”.
  • This value can be used to generate the user ID: ID-Joh-2025

Substring Action Advanced Customizations

  • Dynamic Start: The start index can be determined based on the position of a character in the text (e.g., after the @ character).
  • Conditional Subtext: If the text length exceeds a certain value, only the first X characters can be taken.
  • Substring + Concat Combination: The part obtained with Substring can be combined with another text to create new values (e.g., username + ID).

Technical Risks

  • Invalid Index Error: Make sure that the Starting Index and Count values do not exceed the length of the text. Otherwise, the system may return an error or an empty value.
  • Use of Negative Values: Negative indexes are not supported. Values must be zero or positive.
  • Empty or Undefined Text: If the Value field is empty or null, the action will not execute. The text should be checked for validity beforehand.
  • Type Mismatch: Entering text in fields that expect numbers (or vice versa) may cause unexpected errors in the system.
  • Language and Character Support: Special characters or multi-byte characters (e.g., emojis, Turkish characters) may be counted as more characters than expected in some systems. Compatibility testing is recommended.

Substring is an ideal, powerful, and flexible action for managing and organizing text-based operations in your applications by breaking them into parts. It is frequently used in scenarios such as form validation, username generation, and content filtering.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar