How to check the field is empty or not in workflow

Community Alums
Not applicable

Hi All,

 

how to check the field (owner) is empty or not when the approver approves the RITM, If the field is empty then stop the form submission and show pop up message in workflow using which activity.

 

How can we achieve this

Anyone please help.

Thanks

 

4 REPLIES 4

Sandeep Rajput
Tera Patron
Tera Patron

You can use any of the following ways.

 

if(owner)

or
if(owner!='')

or 

if(!gs.nil(owner))

 

However, you will not be able to show an alert or stop the form submission via workflow script 

Community Alums
Not applicable

Hi @Sandeep Rajput 

 

What is the other ways to do that.

You can try creating an onBefore update business rule on sysapproval_approver table and in the business rule script check if the owner field is empty for the RITM. if yes then show error using gs.addErrorMessage and use current.setAbortAction(true); to abort the transaction.

Community Alums
Not applicable

Hi Sandeep,

 

Can we achieve this in catalog client script because writing business rule on sysapproval_approver will cause performance issue

 

I want to restrict the approval when the approver approve the RITM but I a not able define this condition in catalog script or workflow

 

Is there any other possible way to do this or BR is the only way to implement this?

 

Can you please help

Thanks