Create a double
Function: Create a double
This action allows you to create a new variable in your application's memory (called the "variable scope") and store a number with decimal places in it. This is useful for holding values like prices, percentages, measurements, or any other numerical data that might have fractions.
Input
- Variable Name:
- Description: The unique label you want to give to your new variable. This name will be used to refer to this variable later in your application.
- Type: Text (STRING)
- Required: Yes
- Value:
- Description: The number with decimal places you want to store in this variable. For example,
3.14,99.99, or0.5. - Type: Number with Decimals (DOUBLE)
- Required: No (If not provided, the variable will be created with a default value of
0.0)
- Description: The number with decimal places you want to store in this variable. For example,
Output
- Variable Name:
- Description: The name of the variable that was successfully created. This output can be used to confirm the creation or to reference the variable in subsequent actions.
- Type: Text (STRING)
Execution Flow
Real-Life Examples
Example 1: Storing a Calculated Tax Rate
Imagine you need to store a specific tax rate that includes decimals for calculations in an order processing flow.
- Inputs:
- Variable Name:
SalesTaxRate - Value:
0.075
- Variable Name:
- Result: A new variable named
SalesTaxRateis created in your application's memory, holding the value0.075. The outputVariable Namewill beSalesTaxRate.
Example 2: Tracking a Discount Percentage
You want to apply a special discount percentage to certain products.
- Inputs:
- Variable Name:
SpecialDiscount - Value:
0.15
- Variable Name:
- Result: A new variable named
SpecialDiscountis created, storing the value0.15. The outputVariable Namewill beSpecialDiscount.
Example 3: Recording a Measurement
In an inventory system, you might need to store the weight of an item, which could be a decimal number.
- Inputs:
- Variable Name:
ItemWeightKg - Value:
2.75
- Variable Name:
- Result: A new variable named
ItemWeightKgis created, holding the value2.75. The outputVariable Namewill beItemWeightKg.