Get All variable values onChange to a widget

ServiceNow Tech
Tera Contributor

I have a catalog item with 1 custom variable(Service portal widget mapped) and 5 normal variables like single line text.

In the custom variable, I want to show all the remaining filled variable values and whenever any variable value changes, it should auto update in that widget.

For example: My single line text variables hold 'Abc', 'def', 'ghi', 'jkl', 'mno' values in them then my widget should display

Abc, def, ghi, jkl, mno.

If I update ghi to xyz then immediately, widget should show Abc, def, xyz, jkl, mno.\

 

How can i do that?