Widget - Add green background for newly added rows on multi-row variable set (Service Portal)

PHOTO EMBED

Fri Jun 24 2022 08:19:13 GMT+0000 (Coordinated Universal Time)

Saved by @felipems #javascript

c.addGreenBackground = function() {
  $timeout( function() { //timeout needed because we have to wait for the MRVS to be populated with the new values
    $scope.page.g_form.getDisplayValue('u_applicable_services').split(',').filter(function (el) {return el != null;}).forEach(function(el){
      if (el && $("td:contains('" + el.trim() + "')").length>0)
        $("td:contains('" + el.trim() + "')").parent().css("background-color", "#98fb98");
    })
  }, 500);
}
content_copyCOPY

Widget - Add green background for newly added rows on multi-row variable set (Service Portal)