- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 11:09 PM
Hi Folks,
I have a requirement to include questions on form. The questions comprise of one- two short sentences. What is the best approach to follow ? Shall I increase the column label length? or is there any other approach to it.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2022 12:48 AM
onLoad Client Script to change question text (fieldname: question_1) in UI. The current script only works in UI and not in Service Portal but I think something similar can be done. Since it's DOM manipulation, need to uncheck "isolate script".
Increasing length of the question field may cause performance problem in the instance.
function onLoad() {
try {
setLabelOfInServiceCatalog('question_1', '1. I have a requirement to include questions on form. The questions comprise of one- two short sentences. What is the best approach to follow ? Shall I increase the column label length? or is there any other approach to it. ');
} catch (e) {
alert(e.message);
}
}
function setLabelOfInServiceCatalog(fieldName, value) {
var fieldId = g_form.resolveNameMap(fieldName);
var label = gel('label_' + fieldId);
$j(label).text(value);
}
Execution result:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 11:14 PM
Hi,
You need to change the maximum character length of that variable from the dictionary.
As you aware of Description field on Task/Incident etc. have 4000 character length.
Mark this as Helpful/Correct, if Applicable.
Regards,
Sourabh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 11:16 PM
Hi Saurabh ,
I dont need the field length to be long , I want the Column label to be long

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 11:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2022 11:25 PM
Hi,
Can you share the form screenshot for your question
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader