
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2017 12:09 PM
Hello,
I am trying to clear the value(s) of a Service Portal form when the user reverses their selection. On our Mobile Phone Request form, a user may select "New" or "Upgrade" as a request type at the beginning which will make some fields visible based on their selection and they may input data into these fields. If they choose to switch their request type, some fields will disappear with their input selections while others reappear asking for new or different input. When this occurs I want to blank their values or reset the fields back to an initial state so they are not submitted with the form variables of the request catalog item. This has caused confusion for when completing tasks because the form variables have input for both request types.
I have tried various g.form methods but not able to get any to work. Can you please assist with the proper code to blank/reset.
Thank you,
-Wesley
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2017 02:08 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2017 12:18 PM
Hi Wesley,
You can try using client script with method g_form.setValue('field_name','');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2017 12:45 PM
Hello Wesley,
I guess you might be using On change script for setting value in field "u_standard_device".
Try making appropriate changes to run this on change client script on both on load and on change
please check following for reference-
try commenting this portion of script
Regards,
Surendra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2017 01:22 PM
Hi Wesley,
Please check "Revert if false" checkbox, so that way you can revert the changes back.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2017 01:57 PM
It is already checked.