We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

how to get display value?

Kiddy1
Tera Contributor

explorenow srinivasthelu Developer Community

var fake=current.u_fake;

var fake2='op'+fake.getDisplayValue();

is this correct?

19 REPLIES 19

Shishir Srivast
Mega Sage

Hello kiddy



Please try with



var fake2 = 'op' + ' ' +current.getDisplayValue('u_fake'); // Is u_fake a reference field?


yes


shanjith
Mega Guru

Hi kids kids,


        use to get the data using current.getDisplayValue() if it is an reference field.



Thanks,


shanjith joy




PS: Hit like, Helpful or Correct depending on the impact of the response


lSurya 24
Giga Guru

Hello Kids,



var fake=current.u_fake.name;