Create Reference ICON next to the string field

harishdasari
Tera Guru

Hi,

I have requirement like to create Reference Icon next to a string field in change request form.

When mouse is hovered on the icon, it has to display some text or sentences in it.

Can any one please post code or steps to achieve this requirement.

find_real_file.png

Thank you.

1 ACCEPTED SOLUTION

Hi Mike,



Thank you , I have implemented the Annotation as per your suggestion



but this link also helped me to complete my requirement.




https://www.servicenowguru.com/system-ui/ui-macros/add-macro-non-reference-field/




Thanks


View solution in original post

2 REPLIES 2

mike_allgire
Giga Guru

Is this static information that is being displayed? If so, you could just use the hint option that is available on the label for the dictionary element. This would give you a tooltip on the label (Change the field label or hint). You also have the option to Add an annotation for the text.



If you have to have an icon, that is controlled by a field attribute. You would need to have the attribute added to the field dictionary definition, as well as a custom UI Macro to call it. I think you could use field_decorations, or ref_contributions to call the UI macro.


Available attributes


Hi Mike,



Thank you , I have implemented the Annotation as per your suggestion



but this link also helped me to complete my requirement.




https://www.servicenowguru.com/system-ui/ui-macros/add-macro-non-reference-field/




Thanks