We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to get field label from field name?

tahnalos
Kilo Sage

For any field in a GlideRecord, what is the method used to grab the label name?

Thanks

11 REPLIES 11

Thank you, sir!

Thanks

this help me!!

Vishal Khandve
Mega Sage

Hi,

use gr[field name].getLabel();

Go through below docs.

Servicenow Docs

 

Thanks,

Vishal Khandve

Twist: I'm being fed a bunch of field names through an array, and I need to get the field labels for them.  How do I leverage getLabel to get the label from an array that is dynamically passed?