Blog | Octane Software Solutions

A developer’s guide: Value_Is_String

Written by Baburao G | 6 August 2025 12:00:00 AM

Value_Is_String is a special, reserved local variable used internally by TurboIntegrator scripts. It is not necessary to explicitly declare or assign it within your script; TM1 automatically manages its value during data processing.

Purpose of Value_Is_String

The main role of Value_Is_String is to determine whether the data source value being processed is a string or a number. This helps in scenarios where different operations are needed depending on the data type, such as:

  • Formatting output differently

  • Validating data

  • Applying specific calculations or conversions

How does Value_Is_String work?

  • When the data source value is a string, Value_Is_String returns 1.

  • When the value is a number, the variable returns 0.

This binary indicator makes it straightforward to write conditional logic in your scripts.

Usage in scripts

Since Value_Is_String is a reserved variable, you don’t need to declare it. You simply check its value to determine the data type:

Value_Is_String = N;

  • If N equals 0, the cell contains a numeric value.

  • If N equals 1, the cell contains a string.

Example:

Value_Is_String = 0;   // Check if the value is a number
If (Value_Is_String = 1);
   // Handle string data
Else;
   // Handle numeric data

EndIf;

Practical Applications

Suppose you are importing data where some cells contain text, and others contain numbers. Using Value_Is_String, you can craft logic to process each type correctly:


Value_Is_String = N;

If (Value_Is_String = 1);
   // Process string data
Else;
   // Process numeric data
EndIf;

This ensures your script handles each data type appropriately, avoiding errors or misinterpretations. ### Summary - `Value_Is_String` is a built-in, reserved variable in TurboIntegrator. - It automatically indicates if the current cell data is a string (`1`) or a number (`0`). - It simplifies data type detection, making your scripts more robust and flexible. - No need to define or assign it manually; just check its value in your logic. ### Final Thoughts Using `Value_Is_String` effectively can streamline your data processing workflows in TurboIntegrator, especially when dealing with mixed data types. Understanding this variable helps you build more intelligent scripts that adapt dynamically to the data they process.

Talk to us: media@octanesolutions.com.au