10-13-2017 06:42 AM
I would like to set a form field as required by checking on a value in another form field. So far i can be able to alter form conditions for editable and visible conditions in this manner but not for erquired condition. I can use IG.hasValue(), IG.eval() on my form fields but not for the 'required' property.
How can I achieve this without setting the required property value manually as 'true' in value editor?
08-29-2018 02:07 AM
Based on documentation http://smartclient.intergraph.at/documentation/FormField we can use something like that: required="SESSION[...]
But is that possible to use somehow Form field?
08-30-2018 03:04 AM
This should be related to when the required property is applied, at the form loading.
You can manually set the property in a custom script using something like:
IG.getItemById("FORMFIELDNAME").required("true")
In the script you can than evaluate the condition to use it.
About the approach of using session variables this is viable, but the variable must be set in advance (before loading the form). To set the variable you can use saveinsession property if you are posting the form back to the server or a session trigger.