- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2021 01:08 PM
Below is a screenshot of an onChange script where I am attempting to set the value of a Select Box type variable based on value selected in a Multiple Choice type variable.
Desiring the below:
1) When osc_node_res_action (Multiple Choice type) value is 'new'
osc_node_res_magnetic_flag (Select Box type) should be set to 'Yes'
2) When osc_node_res_action (Multiple Choice type) value is 'modify'
osc_node_res_magnetic_flag (Select Box type) should be set to 'No Change'
I tried using the setValue method first but that had no effect. Then I tried the addOption method which works on the catalog form. But after item submission if I simply refresh the RITM form, there is an alert indicating
"Changes you made may not be saved" with choices to Leave or Cancel.
Also, the value of osc_node_res_magnetic_flag (Select Box type) in the RITM's Variable tab does not change as desired.
NOTE: I have experimented with unchecking the "Applies on Requested Items" and "Applies on Catalog tasks" checkboxes and still the above two behaviors are the same
Or is there any other way I can effect the desired value changes?
Thanks!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2021 09:14 AM
Well, found out that the issue was due to a conflict of the onChange script with a UI Policy on the same field. Now, am setting the value using the Script field in the UI Policy itself instead of in the onClient script and that works
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2021 07:45 AM
Hi
I think we can achieve through Catalog UI policies,
Have you tried it ?
Thanks,
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2021 09:14 AM
Well, found out that the issue was due to a conflict of the onChange script with a UI Policy on the same field. Now, am setting the value using the Script field in the UI Policy itself instead of in the onClient script and that works