Getting value of a choice field in Business rule

sreevishnu
Tera Contributor

Hi,

I am facing some issues in getting the value of choice field in the business rule, I tried using the getValue() and getDisplayValue() in the current object but I am not getting the value in the logs.

I have one separate table and I am using the field in the table using dot walking in the list layout, suppose I have an inciednt table and I have a secondary table called xyz and xyz has a choice field called program, I am dot walking the field program to the incident form using the list layout and I am trying to insert the value into the table xyz from a business rule when the incident form is submitted, in the same incident form I have 3 more reference fields which are coming from the table xyz, but I am getting the values of those reference fields in the business rule and its saving properly, only for this choice field I am not getting the value in the business rule.

Thanks in advance 🙂

14 REPLIES 14

sreevishnu
Tera Contributor

find_real_file.png

do u have any choice values?

Regards
Harish

sreevishnu
Tera Contributor

yes i have choice values, if you are hardcoding the values in the business rule its populating correctly, the issue is that i am not getting that value in the current object.

 

 

Aishwarya3
Kilo Explorer

Hello sreevishnu,

 

I am facing the same issue I tried different ways but not able to find the solution.

If you found the solution then Can you please share with us?

Thank You In Advance.

 

garyopela
ServiceNow Employee
ServiceNow Employee

Try using getElement. It brings back the display value, but you should be able to do current.getElement('u_task_ext.u_client'); and it will return you the display value of the u_client choice list on the u-task_ext reference field. This is handy for both choice fields as well as reference fields. I know this was like six years ago, but maybe this will help someone 🙂