If Value is Number

ConditionMath

Check if a value is a number.

  • Condition block: the blocks placed inside it only run when the condition is met.

Inputs

ValueRequired

Value to check.

Example: 123

If True

Blocks to run when the value is numeric.

Holds blocks

If False

Blocks to run when the value is not numeric.

Holds blocks

Outputs

Result

Whether the value is a valid number.

Example: true

Build a bot using blocks like If Value is Number

Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.

Advanced Documentation

This documentation can be useful when using code mode. View as Markdown

ID: if_value_is_number
  • Condition block: write if if_value_is_number(Args{...}) { ... }, or use it as a "true"/"false" value. See conditions.

Inputs

FieldInventScript nameValue
Valuevaluee.g. "123"
If Trueif_trueblocks: func() { ... }
If Falseif_falseblocks: func() { ... }

Outputs

FieldInventScript nameValue
Resultresulte.g. "true"

Example InventScript

if if_value_is_number(Args{value: 123}) {
	send_text_message(Args{channel_id: trigger.channel_id, message_content: "Yes"})
}

More math blocks