How to set record producer variable to choice field in target record form without duplicates

yaminikoduri333
Tera Contributor

I have a variable request type which of type "Question Choice" and has Question Choices on record producer. It need to be mapped for Sub Category. When i use the below script, Its creating a duplicate. 

current.sub_category = producer.request_type

Sub_Category field already had this choice.

 

Could you please help.

4 REPLIES 4

Rahul RJ
Giga Sage
Giga Sage

@yaminikoduri333 

You need to check the Question Choice value should match the sub_category value.

try below code

current.sub_category = producer.getValue('request_type');

Regards,

RJ

@Rahul RJ Thank You for your reply. But, It is creating duplicate entry in choices of sub_category in the target record.

Hi @yaminikoduri333 

Probably this is because the backend values didnt match as per my understanding.

1. Can you configure the dictionary and check the value of subcategory choice which is already present.

2. Go to the question choice an check the value there

 

These both should have the same value, then only it will not create duplicate. If they are not same then you need to align the code accordingly.

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

@yaminikoduri333  This is due to choice value. The same value should be present in Questions choices and target records choices.

Ex - Question choice - Hardware(DisplayValue) and hardware (value)

The same should be present in question choice options as well as target field choice.

 

Regards,

RJ