Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

sys property call into ui action

Tharun13
Tera Contributor

Hi all,

In sc task form have ui action button, The button called create story. When i click on create story then assignment group auto and product and cmdb_ci and theme populate in story based on assignment group.

 

I have written the sys properties 

 

Sys properties 

[
  {
    "assignment_group": "ServiceNow",
    "product": "Hello",
    "theme": "Hi",
    "cmdb_ci": "ServiceNow"
  },
  {
    "assignment_group": "office",
    "product": "office",
    "theme": " ",
    "cmdb_ci": " "
  }
]


based on the sys properties how to call this into UI action.

Regards,

Tharun

2 REPLIES 2

Shruti
Giga Sage

 

var arr =JSON.parse(gs.getProperty('story_servicenow_group'));
var grp = current.getDisplayValue('assignment_group);

for(var i=0;i<arr.length;i++){

    if(arr[i].assignment_group == grp){
        current.setValue('<product_field_name>',arr[i].product);
       current.setValue('<theme_field_name>',arr[i].theme);
        current.setValue('<cmdb_ci_field_name>',arr[i].cmdb_ci);
       current.update();
    }
}

 

 

 

 

Hi shruti,

not work when i raise a request and see the story means now every thing is blank

Tharun13_0-1731515179484.png

 

regards,

Tharun