How to populate the reference field from record producer to the table

jxa7987
Tera Expert

Hi, 

I have a reference field "department" in record producer, I also have the same reference field "department" in my customized table. I need to copy the value of my reference field to my customized table so I mapped the field value. However, it doesn't copy, the value, the field is empty in the table. 

It has value in the record producer:

find_real_file.png

But empty in the Customized table:

find_real_file.png

12 REPLIES 12

Tanushree Doiph
Mega Guru

Could you confirm the value to be set for the reference field when the producer is submitted?

If you want to set referring to a variable then you can try using

producer.variable_name=current.u_department;

I think it should be the other way around.

So not:

producer.variable_name=current.u_department;

 

But should be like:

current.department=producer.variable_name;

I apologies,

current.u_department=producer.variable_name;

Refer below link as well,

https://community.servicenow.com/community?id=community_question&sys_id=6f2f5a2bdb0a6b80d6a102d5ca96...

Willem
Giga Sage
Giga Sage

Have you set the option "Map to field" on the variable?

As alternative use script:

replace both field_name_of_target table and variable_name with applicable field and variable. If both named department use that (current.department=producer.department);

current.field_name_of_target_table = producer.variable_name;

 

Also refer to:

https://community.servicenow.com/community?id=community_article&sys_id=d650cf501b16dc50d2ccea89bd4bc...