- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2023 03:08 AM
Hi guys,
we encountered an issue in the ticket created via service portal. What happened is when this ticket was created one of the mandatory field in catalog item is blank. So the problem is we cannot change the state of the ticket since they are asking for the value of the mandatory field.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2023 05:16 AM - edited ‎09-25-2023 05:20 AM
Hi @Codi
I assume its a drop-down
There is one way...!! check if it works for you...!!
Open the form -
press below keys on keyboard , don't remove your fingers from button unless you press 'J'
ctrl + shift + alt + j
the below executer will open --
Write below code & click on "Run my code" [upper right corner]
//use your variable backend name
//add one dummy option
g_form.addOption('type of licence','test','test');
g_form.setValue('type of licence','test');
This will set the value to type of licence variable.
Now close the executor and save the form.
Let me know if this worked..!!
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2023 05:05 AM
Hi @Codi
Can you send the screenshot...??
is it reference field or dropdown...??
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2023 05:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2023 05:16 AM - edited ‎09-25-2023 05:20 AM
Hi @Codi
I assume its a drop-down
There is one way...!! check if it works for you...!!
Open the form -
press below keys on keyboard , don't remove your fingers from button unless you press 'J'
ctrl + shift + alt + j
the below executer will open --
Write below code & click on "Run my code" [upper right corner]
//use your variable backend name
//add one dummy option
g_form.addOption('type of licence','test','test');
g_form.setValue('type of licence','test');
This will set the value to type of licence variable.
Now close the executor and save the form.
Let me know if this worked..!!
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2023 06:33 AM - edited ‎09-25-2023 06:37 AM
Hi @Codi
Did you get chance to try the above solution...? it worked ?
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2023 07:27 AM
Hi @Vishal Birajdar it worked in the test environment but we haven't try to used it if no value on the field but thanks for this solution, we can used it in the future