- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2015 01:58 PM
I need to hide/show a field based on the selection in another field. But the value I need to evaluate is a range,
I created a UI policy using a script:
Execute if true:
function onCondition() {
//turn display value into an integer
var intMyVar = parseInt(g_form.getDisplayBox('myvar').value);
if ( (intMyVar ) && ((1 <= intMyVar && intMyVar < 3) || (6 <= intMyVar && intMyVar < 8)) ) {
g_form.setDisplay('myothervar',true);
} else {
g_form.setDisplay('myothervar',false);
}
}
However, this only evaluates onLoad().
If I were able to put this in the UI catalog condition, it would re-evaluate whenever the value of a variable in the variable set changed.
Is there a way to embed something like this into the catalog condition or is my only option to use a catalog client script?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2015 08:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2015 08:05 PM
Hi
On change client script is perfect here.☺
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2015 08:56 AM
Thanks