Hide UI Action when a field is empty
This content was last updated in 2020. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2020 01:14 PM
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:
Thanks,
Heather
- Labels:
-
Resource Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2020 01:32 PM
Hi Heather,
In that case you can try
current.u_rejection_reason!=''
directly in the condition of the UI Action