Conditional in before insert event

Field formattable. I want to check the value before the insert and if it is 0, give an error message and exit. No matter how I word this it isn’t quite happy. Tried:

if ‘{formattable}’ == 0
{
sc_error_message(“PLEASE SELECT A FORMAT”);
sc_error_exit();
}

with and without the ’ around {}.

Ideas?

it should be

if ({formattable} ==0)
{
sc_error_message(“PLEASE SELECT A FORMAT”);
sc_error_exit();
}

1 Like

i should also use sc_alert to get a user friendly message

1 Like