Service Portal Data Table widget - Double-click to edit columns

James D_ Downer
Kilo Explorer

I've cloned the service portal "Data Table with URL filter" widget and am trying to figure out how to edit it so that the end user can double-click a column to edit it instead of it redirecting him/her to the form view for the selected row.

My question is: How do I capture a double-click on the data-table in the Client Controller script, and how do I get both the row and column clicked?

1 ACCEPTED SOLUTION

Jon Barnes
Kilo Sage

Check out this post. I provided a widget that will do what you are asking (but it uses the OOB sp-editable-field directive, so it currently triggers on a single click).

 

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

 

I am attaching here a Kingston version and an Istanbul version. feel free to use these or tweak them as needed.

View solution in original post

10 REPLIES 10

Hey,

I have the same exact issue, did you find a solution for this?

Thanks,

 

Really like this editable list.  However I'm tracking down a bug.  The column order isn't honoring the order I set them in the field_list.  The data.fields list shows them in the correct order, but after passing through the EditableDataTableUtil.getFields() they are not coming back in the right order.  Also in comparing data.fields_array with the OOTB widget, I also notice its really not an array, but just an object. 

Any help would be appreciated. 

Hello @Jon Barnes ,

 

Great work, this is still working in Washington DC.

The only problem with this list is. it is not supporting the currency type field.


though the list edit type is enabled from element UI properties.

do you have any widget which is also capable of editing currency.

 

Thanks,
Amir

vj_1
Tera Contributor

Hello,

I am having another issue with this Editable Data Table Widget, Its giving me an error message of "Uncaught TypeError: Cannot read property 'push' of undefined" (if there is no value in the column) or "TypeError: Cannot read property 'join' of undefined" (if there is a value in the column and trying to update). The column that i need to work on is the glide_list (List Type) which is referencing to the Task Table. 

It also gave me an error about some length as well. Attached is the widget that i used. 

Iqra1
Kilo Contributor

Hi ,

What if I want to do the same for multiple records? Like for selecting multing records we can edit those.

Thanks