Widgets/Transformer
Convert Value Widget
Convert Value Widget
A "Transformer" type widget. Convert Value Widget converts an input value to a different type: String, Integer, Decimal (with configurable decimal places), Rounded Integer, Absolute value, or ImageData.
This is useful for preparing data for other widgets, formatting outputs, or ensuring type consistency in your workflow.
Inputs
- in (DataType: Number, String, Anything, BinaryFile)
The value to be converted. Accepts
numbers,numeric strings, or any value that can be interpreted as anumberorstring. WhenImageDataconversion mode is selected, accepts aBinaryFilecontaining an image.
Outputs
- out (DataType: Number, String, or ImageData)
The converted value, with
typedepending on the selected conversion mode.
Custom Settings
- Convert To — Select the target
typefor conversion:Integer: Converts to aninteger(e.g.,3.7→3)Decimal: Converts to adecimalwith specified places (e.g.,3.14159→3.14)String: Converts to astring(e.g.,3.14→"3.14")Round: Rounds to the nearestinteger(e.g.,3.6→4)Abs: Converts to theabsolute value(e.g.,-5→5)ImageData: Converts aBinaryFileimage toImageData. Only certain image formats are supported:PNG,JPEG,JPG,GIF,WebP,BMP, andSVG.
- Decimal Places — (Only for
Decimalmode) Number of decimal places to keep.

📌 Important Notes
- Only numeric values and numeric strings are converted.
Arrays,objects, and othertypesare ignored - The
output typedepends on the selected conversion mode - For
Decimalmode, the number of decimal places is configurable in the settings - For
ImageDatamode, the input must be aBinaryFilecontaining an image. Supported image formats are:PNG,JPEG,JPG,GIF,WebP,BMP, andSVG. Unsupported formats will result in an error
Example
Convert a Number to Integer
This example converts the value 3.14159 to an integer (3):
Drag the example onto the workspace to explore and experiment!
In this example:
- The Button widget triggers the Value widget to provide the input value (
3.14159) - The Value widget transmits the
decimalvalue to the Convert Value widget - The Convert Value widget converts the
decimalvalue to anintegerusing theIntegermode - The Display widget receives the converted
integervalue and shows the result