Posted: 7 Jul 2015 6:50 EDT Last activity: 19 Oct 2015 2:36 EDT
Dynamically setting pyDecimalPrecision
I have a field ( say SourceProperty) based on which the corresponding amount value ( say DestProp) needs to be formatted to 2 or 3 decimal places, i need to implement this on the same property, is there a way to dynamically set the pyDecimalPrecision value based on the other field selection value ? I am trying to set the precision value in the property control rule. but this doesnt work.... let me know if there is a work around for this !
use .setQualifier(String, String) if exists in 6.x
and your qualifier should be dynamic (not design-time) in the property. To make the qualifier dynamic, don't put any value in the field next to the qualifier name. Leave it blank. (This is from version 4.x)
You could have 2 temporary variables one with a qualifier 2 digit and one with 3.
Have the 2 properties in a section with visibility based on the boolean flag.
A declare expression to set the real decimal to one or the other temporary variable.
Another way of doing it without temporary variables is to use a Data transform that will format the decimal value.
Playing with events you can call the DT on change of the flag and the value of the property.