Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

How to create label in case form

lucky6
Tera Contributor

Hiii,

How to create label in case form..and I have seen annotation but is there way how to hide/display based on some conditions??

How to make it as bold?

Thanks in advance..

 

7 REPLIES 7

anubhavritolia
Giga Sage

Hi Lucky,

 

You can use Annotation only.

 

You can make It bold or do any Styling using HTML value as below sample:

AnubhavRitolia_0-1665152537430.png

 

You can also Hide/Show Annotation. Please refer below links for more help:

https://www.servicenow.com/community/developer-forum/how-to-get-the-id-of-an-annotation-in-form/m-p/...

https://www.servicenow.com/community/developer-forum/how-to-hide-display-the-annotations-on-the-form...

 

 

 

 

 

Hi Anubhav,

Thanks for your reply..hide/show annotation is working for OOB tables but its not working for custom tables which are extended from case..

 

Do you have any idea on this?

Hi Lucky,

 

Can you share the code you are writing to hide or show it.

Hi Anubhav,

Please check the below code..

function onChange(control, oldValue, newValue, isLoading, isTemplate) {

// Show annotation if field Is "yes"
if (g_form.getValue(test)== 'yes'){
$('my_annotation').up().show();
}
else {
// Hide the annotation
$('my_annotation').up().hide();
}
}

................

I have tried the community url which you shared but its is throwing an error as "onChange script error: TypeError: $ is not a function function () { [native code] }".