Widget on task

Vaishali 11
Tera Guru

Can we display widget like variables on a particular catalog task?
If yes, what is the way to achieve it?

 

Thanks,

Vaishali

9 REPLIES 9

Aditya Raute
Mega Guru

Hi @Vaishali 11 Can you provide more information on your question? I'm not sure what 'widget like variables' means in this context.

 

If you could share the exact use case that would be very helpful, too.

On the order form there are some fields which are in the form of widgets. I want to display 2 fields from that widget on the task so that the fulfillment group can see what was ordered for whom.

 

Thanks,

Vaishali

There are two possible interpretations of what you mean here-

 

A) Fetch data from catalog tasks and display in a widget on Service Portal

 

B) Get data from Widgets of Service Portal and display this to the Catalog Task fulfiller


Either way, more details with screenshots will be helpful.

 

For A, you can write a server script referencing the catalog task records and fetch the fields you want in the server script and pass it on to the HTML template. 

 

For B, you can create two new fields on the catalog item and keep them hidden for catalog item view and requested item view and only show them on the catalog task view (this can be done via catalog client scripts). Then you can populate those two fields whenever someone clicks on a button in the service portal, via catalog client scripts or portal widget's client/server script.

 

Hope this helps.

It's Scenario B

Vaishali11_0-1671193473692.pngVaishali11_1-1671193497444.png

As you can see here, I want the user name and serial number on the catalog task.