Hello!
I am building a workflow, that should tick a check box in real time if certain condition is true.
I can do this after submit.
Like so:
Empty entry (State 1)
Transition On: After Record Submit
Condition: REGEXP_INSTR({custrecord_my_field}, '[A-Za-z]' ) > 0
State 2:
Action: Set Field Value (Set field value MyCheckBox=T)
Transition On: After Record Submit
Condition: REGEXP_INSTR({custrecord_my_field}, '[A-Za-z]' ) < 1
State 3:
Action: Set Field Value (Set field value MyCheckBox=F)
Now, In real time I have tried this:
Entry (State 1)
Action:
Trigger On: After Field Edit
Triggering Client Fields: custrecord_my_field
Parameters:
Field:
MyCheckBox
Value:
Formula:
IF REGEXP_INSTR({custrecord_my_field}, '[A-Za-z]' ) > 0 THEN 'T' ELSE 'F' END IF;
Formula explained (what I am trying to do):
If REGEXP_INSTR finds letters from the field, tick a check box (return 'T'). If there are no letters in the field, un-tick the check box (return 'F').
I am suspecting that my formula is wrong. This ends up as an infinite loop on the record. It selects the source field and then some other field and keeps looping this.
And it does not do what it is supposed to do, tick or untick the check box. It just gets stuck.
I have also tried:
case REGEXP_INSTR({custrecord_my_field}, '[A-Za-z]' ) when 0 then 'T' else 'F' END;
-----
case
When REGEXP_INSTR({custrecord_my_field}, '[A-Za-z]' ) > 0 Then ‘T’
When REGEXP_INSTR({custrecord_my_field}, '[A-Za-z]' ) < 1 Then ‘F’
End
Any help would be appreciated.