how to get the value from sysid in business rules

Chandra31
Tera Contributor

Hi Team,

how to get the value from sysid in business rules.

Thanks,

Chandra

14 REPLIES 14

Are you trying to get sys_id of current record? or sys_id of "metric_instance"?



if sys_id of current record - then use current.sys_id



if sys_id of "metric_instance" - you may try gr.sys_id


I usally use the getUniqueValue() to fetch the sys_id.


for example gr.getUniqueValue()



//Göran


Hi



how to get the assignment group name in business rule.



Thanks,


Chandra



On Nov 12, 2016 5:14 PM, "goranlundqvist" <community-no-reply@servicenow.com>


Like Andrii wrote:



if name of current record - then use current.assignment_group.getDisplayValue();



if name of "metric_instance" - try gr.assignment_group.getDisplayValue();



Note that these will retrieve the name of the assignment group, not its sys_id



harel


Chandra31
Tera Contributor

Hi Team,



I have two fields(field1 and value1) in metric instance form and I need to


get the assignment group name and set it to those values in metric


instance fields in the business rules.



Thanks,


Chandra