Enter a new input in comment field once Close button is clicked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2024 07:05 PM - edited ‎01-30-2024 07:06 PM
Hi, just wanted to know the best approach to make the comment field mandatory to enter a new input once the close button is clicked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2024 07:27 PM
Hi @Lawrence29
If your UI Action has the Client checked, you can set the field mandatory right inside the UI Action within the client side function.
Sample.
In the other hand, you can also define an UI Policy to make the field mandatory when the state is closed.
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2024 07:33 PM
Hi Timi,
My UI Action is not client checked as it is also a backend UI action. I already set it up as mandatory in UI Policy.
My ask is how can the Close UI Action require a new Comment input even though there is already a text in the Comment field.
Thanks,
Lawrence
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2024 08:12 PM
Hi @Lawrence29
Oh now I see your use case. You may need to have a Before Update Business Rule to achieve it.
Sample below.
(function executeRule(current, previous /*null when async*/) {
if(previous.getValue('u_comment') === current.getValue('u_comment')){
current.setAbortAction(true);
gs.addErrorMessage('Please input your new comments beside the existing ones');
}
})(current, previous);
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2024 08:38 PM
Hi Timi,
Can we call that in the UI action? it does not show the error message when clicking close button
Thanks,
Lawrence