Get data format attribute type
Function: Get data format attribute type
This action helps you discover the type of a specific field (attribute) within any of your application's data structures (data formats). For example, you can find out if a field stores text, numbers, dates, or a True/False value. This is useful when you need to perform operations that depend on the data type, like formatting or validation.
Input
- Data format:
- Description: Choose the data structure or table in your application that contains the attribute you're interested in.
- Type: A data structure or table.
- Required: Yes.
- Attribute:
- Description: Select the specific field within the chosen data format whose type you want to identify. The available attributes will automatically update based on the 'Data format' you select.
- Type: A single field within a data structure.
- Required: Yes.
Output
- Type:
- Description: The name of the variable where the identified type of the attribute will be stored. This variable will hold a text value representing the attribute's type (e.g., "STRING", "NUMBER", "DATE", "BOOLEAN").
- Type: A piece of text.
- Default Value:
ATTRIBUTE_TYPE
Execution Flow
Real-Life Examples
Example 1: Checking a Customer's Email Field Type
- Scenario: You are building a form and want to ensure that the 'Email' field in your 'Customers' data format is indeed stored as an email type before performing email-specific validations.
- Inputs:
- Data format:
Customers
- Attribute:
Email
- Data format:
- Result: The variable
ATTRIBUTE_TYPE
will contain the textEMAIL
. You can then use this information in a conditional logic block to proceed with email validation if the type isEMAIL
.
Example 2: Verifying a Product's Price Field Type
- Scenario: You need to display product prices on an e-commerce page and want to confirm that the 'Price' field in your 'Products' data format is stored as a number or currency, so you can format it correctly with currency symbols.
- Inputs:
- Data format:
Products
- Attribute:
Price
- Data format:
- Result: The variable
ATTRIBUTE_TYPE
will contain the textCURRENCY
(orDOUBLE
/NUMBER
depending on how it's defined). This allows you to apply appropriate currency formatting.
Example 3: Determining the Type of a Task Due Date
- Scenario: In a task management application, you want to dynamically adjust how a 'Due Date' field is displayed or used in calculations. You first need to confirm it's a date type.
- Inputs:
- Data format:
Tasks
- Attribute:
DueDate
- Data format:
- Result: The variable
ATTRIBUTE_TYPE
will contain the textDATE
. Knowing this, you can then use date-specific actions to calculate remaining time or format the date for display.