GMSC Discussions

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Regular Contributor
Posts: 185
Registered: ‎08-10-2016

Setting FormField as Required based on value in another form

 

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?

Regular Contributor
Posts: 170
Registered: ‎07-07-2016

Re: Setting FormField as Required based on value in another form

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?

Staff
Posts: 1,051
Registered: ‎10-18-2015

Re: Setting FormField as Required based on value in another form

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.

 

 

Stefano Turcato
Presale Engineer
Hexagon Geospatial