Question How we can change the field format based on the field value at run time in ADM2

Rajendra Kumar

New Member
Hello Everyone

We would like to know that how we can change the field format in Viewer and Browser based on the field value at run time in ADM2.
For example
Field1 original format was ">>9.99" .
As value is stored in DB is "4567.789" so based on this at run time we need to change the original field format to ">>>9.999" to suppress the display error on the Viewer and Browser.

Any help would be appreciated on this.

Thank you!
 

TomBascom

Curmudgeon
If you know the field's handle (or if you can easily find it) then you can just adjust the FORMAT attribute at runtime.

If you do NOT know the field's handle you will need to find it. Usually using some variation on walking the widget tree looking for a FILL-IN widget with the name of your field.

Adjusting such things at runtime might be challenging if it impacts the screen layout. The ideal time to do it is before anything gets painted on the screen. Actually the *ideal* time to do it was back when the code was first designed - but that horse has left the barn...
 

Rajendra Kumar

New Member
If you know the field's handle (or if you can easily find it) then you can just adjust the FORMAT attribute at runtime.

If you do NOT know the field's handle you will need to find it. Usually using some variation on walking the widget tree looking for a FILL-IN widget with the name of your field.

Adjusting such things at runtime might be challenging if it impacts the screen layout. The ideal time to do it is before anything gets painted on the screen. Actually the *ideal* time to do it was back when the code was first designed - but that horse has left the barn...
Thank you so much Tom for your inputs!
 
Top