Clear values on a reference field using catalog client script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2015 12:00 PM
Hi all,
I'm facing an issue with a catalog client script to clear the values of a field when another one is selected... In the catalog item, I have two options that the user can select: 1) Hardware, 2) Software. Based on this selections, other fields appear for the user to select an item and an issue. For example, if a user selects Hardware option, and select a hardware item and issue but then decide that they need to select the Software option instead, once they click on Software, the other fields should be cleared of the data entered and hidden.
I have a UI policy that shows and hides the fields when conditions are met but the data is not being cleared out. I tried writing a client script but no luck, it doesn't erase the data that was entered previously... Below are some screen shots of what I have done. Any suggestions? Please help!!
This screen shot is looking at the "issue_type" field which is a multiple choice field to select Hardware or Software. The onChange script is supposed to look at the field and if it changes, then set the "sw_ci" to empty which is the reference field for software items (CIs). The sane would be vice versa... I don't have to have the questions there but I just added to see what would happen... and nothing happens.
I also tried this one, but still no results.
This is how the item looks, and depending on the selection for hardware or software, should there be any data in the item or issue field, it should be cleared out when another option is selected. For example, if I select 'Software Item', then the information for hardware should be cleared out...
Any ideas/ suggestions would be greatly appreciated!
Thank you,
Yeny Garcia.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2016 01:03 AM
Hi Garcia,
Since these kind of issues are best solved when we are present in front of the system, as of now I would suggest a work around for this :
Make a UI Policy:
Condition : "Please select a hardware item" is Empty
UI Action : "Please select a Symbol Unit" Visible : False
I chose the "Please select a hardware item" variable because this is one of the variable you have chosen to clear the value. Also this variable is not present in the UI Policy you have already written.
Let me know your results.
Thanks,
Arnab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-27-2016 02:59 PM
Hi Yeny,
Were you able to resolve this? Currently having the same issue.
Your assistance is appreciated.