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

vkachineni
Kilo Sage
Kilo Sage

You will have to use the condition on the UI action to control the visibility 

 

find_real_file.png

Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Vinod Kumar Kachineni
Community Rising Star 2022

MrMuhammad
Giga Sage

in the condition field of UI action you can write something like this

current.<field_name> != ''; //replace <field_name> with actual field_name that you want to filled in.

 

Regards,
Muhammad

Here is my condition-how do I capture this? u_rejection_reasonISNOTEMPTY

Hi @Heather White,

here is your condition. 

current.u_rejection_reason != "";

find_real_file.png  

Regards,
Muhammad