Pass values from a Widget to a Catalog item variable

Dazler
Mega Sage

Hi,

I have built a widget that is essentially just a lookup to a table.  That is working.  Now I have been tasked to add it to a catalog item form as a UI macro.

What I need to do is pass the value from the widget to a catalog item variable.  If this is possible, how would I do it?

1 ACCEPTED SOLUTION

Dazler
Mega Sage

I figured it out.  I added a function to watch if the field value changes.

function($scope) {
/* widget controller */
var c = this;

$scope.$watch(function(){

$scope.page.g_form.setValue('terminated_user', c.data.user.value);

});

}

View solution in original post

5 REPLIES 5

shalani r
Tera Contributor

Hello @Dazler ,

    I'm not able to achieve it even after your suggestion.

Kindly help if I have to change something.

shalanir_0-1701335037125.png