Passing data value from one widget to another

Sri56
Tera Contributor

Hi Team,

 

we have a requirement to forward the approval action.

we have now introduced a new button called forwarded as below:

Sri56_0-1675410932913.png

once selected, it will ask for whom to forward and the comments as below:

Sri56_1-1675410981205.png

where this forward request pop-up is all together new widget which has been mapped.

So we now have to pass the forwarded user value to the main widget from where this has called.

So please help me on how to pass this data value.

 

As of now, i have hardcoded to some user value and its working fine.

I just need to replace this with dynamic value.

 

Please help me!

 

Thanks,

Sri

1 REPLY 1

Samaksh Wani
Giga Sage
Giga Sage

Hi Sri56,

 

For this You need to use .broadcast() and .emit()  for passing data from one widget to another.

 

https://www.youtube.com/watch?v=e_mafzZbUAs

 

Mark my Solution as Accept and Helpful, if you got help from it.

Communication between the widget to the widget is possible in service now as it's using angular JS as frontend. Communication between two widgets is called broadcasting in angular JS. Please follow the below steps to create communication between two widgets. 1. Create a portal page 2. Create 2 ...