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

Mapping Record producer field to HR case form field

Not applicable

Hi Team,

On a record producer I have tried to map a Lookup select box with category field on a Hr Service Case form using record producer script.

I have used below script but instead of mapping with the choice already defined, it is creating the new choice in category field. Please help me on this? 

 

Record producer (filed):- tool_provision  (value comes in "u_variable option" table)

HR case form (field) :- u_hr_service_category  (it is a Custom Filed and Value Comes in sys_choice table)

 

Script :-

 

var cat=producer.tool_provision.toString();
current.u_hr_service_category =cat;
 

 

note-Without Field map we need complete this functionality (using record producer script)

 

 
7 REPLIES 7

Sandeep Rajput
Tera Patron

@Community Alums Can you share the type specification screenshot of your look up select box. 

 

Also please confirm if u_hr_service_category is a reference field or a choice field, and if tool_provision returns a sys_id or a choice value.

 

Hope this helps.

Not applicable

Hi @Sandeep Rajput 

 

u_hr_service_category is a choice field and  tool_provision returns a choice value

 

cat.png

 

tp.png

@Community Alums HR Service Category is a dependent field. Could this be the reason why a new choice is getting created?

Not applicable

@Sandeep Rajput 

How to overcome this Issue ?

is there any script for mapping the correct Value ?