The CreatorCon Call for Content is officially open! Get started here.

Record producer variable value is not mapping to the field in another table

Community Alums
Not applicable

Hi all,

There is no way to use map the field in variable.

I have created a record producer on hr case table and the field was on the employee table. the case gets created on another table at a particular condition. So now i need to map the field value with the record producer value. The field type is choice and the value and the label of both record producer questions and the field choices are same but it was not setting the value. I have used the line in record producer script is:

employee_table.fieldname=record_producer.variable name

 

can anyone help me how to resolve the issue

9 REPLIES 9

@Community Alums 

can you tell me the data type for both fields or  variables./ also if choice field on both ends check the choice value for both variable has to be same or else try this static code

 

if(producer.variable_name=="company")// company is the choice value  of the variable which you will select in record producer

{

current.field_name="TATA";//here you are setting varaible value into current employee record which is been submitted by you.

}

and also apply logs on producer.variable_name and check when you enter/select the value for the variable , whats coming into logs and then try to set in current object which will refer to employee table as mentioned in field "tablename" in sc_cat_item_producer table(record producer)

 

let me know once you try this


Please accept the solution /mark this response as correct or helpful if it assisted you with your question.




Regards,
Animesh

Abhit
Tera Guru

@Community Alums  - You are trying to update or map the value to an another table where RP is not build on that, in this case use the script field and perform the GlideRecord and update the value.

Community Alums
Not applicable

@Abhit I was trying to set the record producer value to the field by default the field dropdown is none. I have tried gliderecord and setting the field and using update but it was not getting updated

@Community Alums  - field which are not present for direct mapping to the table shouldn't be mapped directly, and use script to set those value to the target records field. if you need complete solution send me the details on the private message. will help you on the solution

Community Alums
Not applicable

@Ankur Bawiskar Can you please help me with this