Need to Add Editable field in portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2020 01:49 PM
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');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2020 02:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2020 11:32 PM
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 ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2020 12:02 AM
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();
Let me know if this help or not.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2020 04:28 AM
Hi Snow,
You can use getForm to make it editable, for example
HTML:
Client:
Server:
OutPut:
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.
Cuong Phan
ServiceNow Technical Lead