SAGE X3 SCRIPT EDITOR - CONDITIONAL MANDATORY FIELD

SUGGESTED

Good day all. 

I want to write a small specific with an action on a field.

If Field A = 'condition' then Field B = Mandatory user input. Mandatory user input, users cannot move away from the field until they enter the data.

What is the command in script editor to achieve a conditionally mandatory field?