How to make record producer populate field ?

____39
Tera Contributor

I have a record producer variable 'assign to' which mapping to incident table 'assign to' , I want to make this variable automatically populate 'assign to' variable when user request in service portal, How to do it?

1 ACCEPTED SOLUTION

Hi,

If my reply above was Helpful, please mark it as such.

In the record producer script (on the record producer settings page), you can simply use something like:

if (producer.assigned_to == '') {
current.assigned_to = 'sys_id_here'; //you can also set a sys_id to a system property and instead use: gs.getProperty('property_name');
}

This will evaluate if the assigned_to field is empty on your record producer and if so, place a value on the resulting record automatically.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

5 REPLIES 5

Allen Andreas
Administrator
Administrator

Hi,

You can choose the "map to field" checkbox on the record producer variable and/or use the same name for the variable as the field name on the record (such as: assigned_to).

Keep in mind that the assigned_to field may be dependent on the assignment group field and if so, your assigned to may need to be in the group selected in assignment group, for example.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi, I want to achieve when user is not entering anything, assign to information are populated automatically in the variable

Hi,

If my reply above was Helpful, please mark it as such.

In the record producer script (on the record producer settings page), you can simply use something like:

if (producer.assigned_to == '') {
current.assigned_to = 'sys_id_here'; //you can also set a sys_id to a system property and instead use: gs.getProperty('property_name');
}

This will evaluate if the assigned_to field is empty on your record producer and if so, place a value on the resulting record automatically.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hello,

It is explicitly stated in my reply above that you can also set the value using a system property and I give instructions on how to do so, above, as well.

Thank you


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!