Abort Workflow If Condition Not Met

I want to make a field go through workflow (from Pending to Approved) if and only if field A is not null. Is this achievable through field level or need to go through custom script. In both cases, kind-of help will be hugely appreciable. Thank You

This is what I found in my workflow and tried something like

Still No Success. ANy help please

@nikzz I guess your condition is worng.

Could you try :

doc.fumsg1 != undefined

@nikzz, you code should be Python not js, telling that, the appropriated syntax should be

1 Like

Not worked…giving error

NameError: name 'bool' is not defined

Throwed error

  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1489, in safe_eval
    return eval(code, eval_globals, eval_locals)
  File "<string>", line 1, in <module>




Its quite working but what happened here is. It hides the action button until fumsg field is null. What exactly I want is there should be action button and if fumsg field is empty, give an alert and abort workflow

hey do you found any solution for the query. i’m also facing same issue

Try this :
doc.get('fumsg1') != None

Did this work?
if not could you please help guiding the correct syntax?