Clear/cancel auto populated 'Requested_for' field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2022 04:48 AM
Hy Guys,
I am having a bit of trouble to figure how to clear the value of a field 'requested for' type in the form. The problem is that this Item is under the Technical catalog and does not appears in ServicePortal, so an UI policy have not helped me so far.
what I have it does clean the value:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
g_form.clearValue('adm_account');
}
but also, it Clears any other value I may set.
I have tried onload function but it hasn't work.
Is anybody there whiling to help? 🙂
Appreciate any help,
thank you.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2022 05:05 AM
Bit confused. If I understand correctly you have a variable with default value that you wish to override? OR something else.
Script above looks fine.
Also, 'The problem is that this Item is under the Technical catalog and does not appears in ServicePortal' Can you elaborate bit more on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2022 02:53 AM
Hi
Anyway, this should not be the case, and I would like to load the form with this variable value empty, so the user has to enter the correct account (in this case is most likely not to be the logged in user).
The problem is that an UI policy did not helped me. And the script I have works, but I would like something to work 'on load' no 'on change' because as soon as the request is loaded the field should be empty.
BR,
Suellen.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2022 05:10 AM
Hi,
Your requirement is not clear.
If you want to clear requested for field then in the script why are you clearing adm_account field.
And when should you clear the field based on any other field or onload you need to clear default value.
How is service portal and technical catalog related to this.
Regards,
Sumanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-18-2022 02:45 AM
Hi
In the ServicePortal, a simple UI policy would solve my issue. But in the technical catalog the catalog items are only available in the back end not in ServicePortal, therefore I need to script it.