0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions114

Generate → Number

AI-generated

Overview

This node operation generates a number within a specified range and type. It supports generating either an integer or a decimal number between a defined start and end range. This is useful in scenarios where random or specific number generation is needed, such as creating test data, simulations, or dynamic inputs for workflows.

Use Case Examples

  1. Generating a random integer between 1 and 10 for use in a game or quiz application.
  2. Creating a decimal number within a range for financial calculations or simulations.

Properties

Name Meaning
Code Variables Allows defining custom code variables that can be used within the code editor for the selected function. Users can specify variable names or IDs and assign values to them.
Range Start The lower bound of the number range. The generated number will be greater than or equal to this value.
Range End The upper bound of the number range. The generated number will be less than or equal to this value.
Type Specifies whether the generated number should be an integer or a decimal.

Output

JSON

  • number - The generated number within the specified range and type.

Dependencies

  • An API key credential for the codeKit API is required to perform the generation.

Troubleshooting

  • Ensure that the 'Range Start' is less than or equal to the 'Range End' to avoid errors or unexpected results.
  • If the node fails, check that the API key credential is correctly configured and has the necessary permissions.
  • Verify that the 'Type' property is correctly set to either 'integer' or 'decimal' as required by your use case.

Discussion