Hide UI Action when a field is empty

Heather White
Mega Guru

Hi Community,

 

      We have a field for "rejection reason" when a resource plan is rejected.  I have configured it so this field shows when "Rejected" is selected, but because the workflow has already moved to "rejected" once the user sees the "reason" field, the email to let people know that it was rejected does not include the note. 

Can I hide the UI Action until this field is filled in?  Any other suggestions? 

In the UI action, this code does not work:

function onCondition() {
$$('reject')[0].hide(); //This will hide the top button
$$('reject')[1].hide(); //This will hide the bottom button as well
}
 function onCondition() {
$$('reject')[0].show(); //This will show the top button
$$('reject')[1].show(); //This will show the bottom button as well
}

Tried this also:

find_real_file.png

Thanks,

Heather

 

 

5 REPLIES 5

Jaspal Singh
Mega Patron
Mega Patron

Hi Heather,

 

In that case you can try 

current.u_rejection_reason!=''

directly in the condition of the UI Action