Adding labels to a form without using annotations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2022 04:40 AM
Is adding annotations the only way to add labels to a form?
I am having a problem with controlling annotations visibility using UI policies. At the same time, client scripts seem to only work on UI16 and not agent workspace. Are there alternative methods of adding labels to a form that can be controlled by UI policies?
Working on UI16:
Not working on agent workspace:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2022 01:33 PM
Hi
Did you explore the following GlideForm API, that can be used in client scripts or UI policies.
g_form.setLabelOf('comments', 'New Label of the field');
Thanks
Sukhbir Singh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2022 01:18 AM
Hi Sukhbir,
Thank you for the help. However, g_form.setLabelOf changes the label of existing fields, our requirement is to insert a section header label that can is dependent on field selections, just like how label type fields can be inserted in record producers based on ui policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2022 01:59 PM
Hi Miguel,
you can use the following statements in client script as per your requirements to show labels/annotations under any field on a form;
g_form.showFieldMsg('category', 'Your label/annotation', 'info'); //Shows an info message
g_form.showFieldMsg('category', 'Your label/annotation', 'error'); //Shows an error message
Hopefully this will help you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2022 01:21 AM
Hi Muhammad,
Thank you for the help. However, g_form.showFieldMsg inserts messages below the specified field in the form, our requirement is to insert a section header label that can is dependent on field selections, just like how label type fields can be inserted in record producers based on ui policy.
if there is any way that g_form.showFieldMsg can display messages above the specific field instead of below, then that might be okay as well