Quantcast
Channel: Ivanti User Community : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 15294

Dynamic Window - SetMandatory - can't undo Mandatory field

$
0
0

I have this in my calculation field, where MyAttribute is a boolean value displaying as a checkbox in the Web form.

 

import System

static def GetAttributeValue(Request):

MyValue = false

 

if Request._MyAttribute == true:

MyValue = true

return String.Format(":SetMandatory(_TargetField, {0});", MyValue)

 

 

I have also tried this:

 

 

import System

static def GetAttributeValue(Request):

MyValue = false

 

if Request._MyAttribute != null and Request._MyAttribute == true:

MyValue = true 

return String.Format(":SetMandatory(_TargetField, {0});", MyValue)





Both seem to work fine as far as setting the target field as mandatory.  The issue is that when MyAttribute is de-selected, the field does not go back to non-Mandatory.



Is there any trick to make this work?

Thanks!








Viewing all articles
Browse latest Browse all 15294

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>