Annotation boxes too long, how can I shorten them?

donb_
Kilo Expert

I have several annotation fields where the box of the annotation field spans the whole page or just half the page.   I would like to limit/specify the size (and position) of the annotation field to align with the text box of the actual field to which the annotation applies.   I have mocked up the problem and the desired result below.   Thanks for viewing my post - any help or suggestions would be most appreciated!

find_real_file.png

                                 

7 REPLIES 7

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Hi Don,



I think you could do this using some inline css in your annotation. Something like:



<span style="width:200px;text-align:right;">Enter a yada yada</span>


Brad:


Thanks for the suggestion - unfortunately, the span appears to have no effect.   I tried it both with selecting 'Info Blue Box with Bold" and just "Text" for the annotation box type but the desired change was not achieved with either.


Don


Brad Tilton
ServiceNow Employee
ServiceNow Employee

You might try a div instead, I seem to remember that working better. If the styling doesn't work, you could give it an id and then do the styling in some onload javascript, but that seems overkill.


nelutomsa
Kilo Contributor

This might be a old post but for those who still face this issue, I would recommend creating it with UI Policies.

Steps to follow:

1. Create a new UI Policy and select the table

2. Insert the conditions when the annotation should be visible

3. Check the Run Scripts checkbox and in Execute if true box insert this: g_form.showFieldMsg(variable_name, "Your message");

The first value from the function should be your variable name from the form under which you would like the annotation to be. Second, obviously should be your message.

Hope this helped 🙂