Need to Add Editable field in portal

Snow47
Kilo Contributor

Hi All,

Need a help to add new field called "Time to complete" field (string)  in portal which should be editable  , helpdesk/end user has to update  this field (like 2 days , 4 days....etc any string) , 

These has to update in incident form , kindly help me where can i update code either in existing widget or new widget .

i added below server script , but this field read only , i want this editable.

 

var fields = $sp.getFields(gr, 'number,state,priority,sys_created_on,u_time_to_complete');

 

find_real_file.png

 

 

find_real_file.png

9 REPLIES 9

Kieran Anson
Kilo Patron

Hi,

You will need to clone and edit the 'Ticket Fields' widget to add in your custom field.

find_real_file.png

Thank you kienan for update , i have already added this  ( you can see in my screen shot)  but its in read only.

Could you please help me on editable ?

Siddhnath Pande
Mega Guru

Hey,

The page sc_cat_item from where you are redirecting to this page ticket which contains the widgets like Ticket field, ticket conversation, session etc.

I didn't get, where exactly you want this editable field. However on the SC_CAT_ITEM page you can add editable field.

or on the ticket conversation as well you can add text-box after clone the ticket conversation like this below

 <input type="text" placeholder="Write your content here...."  /> in HTML script after line no. 33

But this will be static to update the data fo this field you have to write the logic as well.

Or if you want in ticket field widget

then there will be a method in server script, try changing the canRead() Method with canWrite();

find_real_file.png

Let me know if this help or not.

 

 

Cuong Phan
Kilo Sage

Hi Snow,

 

You can use getForm to make it editable, for example

HTML:
find_real_file.png

Client:

find_real_file.png

Server:

find_real_file.png

OutPut:

find_real_file.png

 

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.

 

Cuong Phan

DXC Consultant.

Regards,
Cuong Phan
ServiceNow Technical Lead