Create buttons on Widget(Data Table from Instance Definition)

Prem20
Giga Contributor

Hi,

Is it possible to create buttons on 'Data Table from Instance Definition' widget such as below.

 

find_real_file.png

The idea is if we click on 'Start' on one record, where state is not in 'On' should change the VM's state to 'On'

Any help is appreciated.

TIA

 

 

 

6 REPLIES 6

Mahesh23
Mega Sage

Hi,

Yes its possible, you can create new onclick() function on client side and update state when onclick() function is called.

Community Alums
Not applicable

Hi Prem,

<button> tag is used to create buttons in widgets. 

Below link will be useful

https://stackoverflow.com/questions/19174110/how-to-show-long-text-with-more-button-using-angular

and  https://serviceportal.io/real-time-app-using-service-portal-record-watchers/

You will get plenty of ideas over a search.

Also, refer to this thread, this has a similar discussion :

https://community.servicenow.com/community?id=community_question&sys_id=fb605b29dbdcdbc01dcaf3231f96...

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

Community Alums
Not applicable

Hi Prem,

Any update to this ?Any follow-up required? if not

Kindly mark the answer as Correct & Helpful both such that others can get help.

Thanks,
Sandeep

SN Hackery
Kilo Expert

You might find some code or artifacts in here that might be helpful:

https://developer.servicenow.com/connect.do#!/share/contents/5257137_snh_data_table_widgets?t=PRODUC...