How to display Label instead of the Value?

Jared Wason
Tera Guru

Hi, I am working on a UI action to create an incident from a demand. I am trying to bring over the state from the demand to the incident. However it is coming to the incident as the value instead of the label. Below are the different ways I have tried to get the label to display. It should say "Screening" instead of "3". Can someone tell me how to fix this? 

find_real_file.png

grInc.description += '\nState1: ' + current['state'].getLabel();
grInc.description += '\nState2: ' + current.state.getLabel();
grInc.description += '\nState3: ' + current.getValue('state');
grInc.description += '\nState4: ' + current.getValue(current.state);
1 ACCEPTED SOLUTION

vkachineni
Kilo Sage
Kilo Sage

current.getDisplayValue('state');

Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Vinod Kumar Kachineni
Community Rising Star 2022

View solution in original post

1 REPLY 1

vkachineni
Kilo Sage
Kilo Sage

current.getDisplayValue('state');

Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Vinod Kumar Kachineni
Community Rising Star 2022