- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2022 06:24 PM
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?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2022 07:00 AM
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!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2022 06:35 PM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2022 06:40 PM
Hi, I want to achieve when user is not entering anything, assign to information are populated automatically in the variable

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2022 07:00 AM
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!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2022 07:24 AM
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!