The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Broadcasting on Service Portal

shahid1
Kilo Expert

Hi,

I have a multiple reference field widget on my service portal on which multiple values can be selected.

On the other hand i have one more widget below it with two tiles like structure each having a view button on it which when clicked takes the user to   page where he/she can view the specific report.

The multiple reference field now has multiple values selected to it and when the user click on the view button of one of the tile on the other widget the values(can be more than one) from the multiple reference field should be applied as a filter and the report should be displayed on the other page's widget.

How this can be achieved?

Any help?

Thanks,

Shahid

Laurent Chicoine

7 REPLIES 7

Hi Lars,



The value which is broadcasted from is a reference picker and when this value changes the data in the other widget should also change. In the above case you mentioned the function is called on a click and in my case there is no click. Any idea on how i can send the value from client controller to server side on change of the value in the other widget?



Thanks,


Shahid


larstange
Mega Sage

Yes you place the call to the server inside your broadcast event handler. Then every time the event is received you forward the event information to the server


Hi Lars,



I am very very new to service portal and angular js. So can you help me more on this?



My script on the client controller of the receiving widget looks like:-


$rootScope.$on('setFilterBroadcast', function (event, data) {


  $scope.setNewFilter = data;


});



Where setFilterBroadcast is the variable which is used to broadcast the value from the original widget. And i am setting that value fetched to $scope.setNewFilter.



So how can i proceed from here?



I really appreciate your help.



Thanks,


Shahid