Uniface on GitHub
Fixes and Updates
Version 9.7.04 G422
If I set $FieldProperties on a read to store an original value and never set $FieldProperties again for the field, my value is retained.
However, after setting the value, if I store another property, such as BackColor, my original value property disappears.
In initial Proc:
$FieldProperties(Receipt_Volume.Table_Name) = "OriginalValue=%%nReceiptVolume%%%"
In some other Proc :
sProperties = $FieldProperties(Receipt_Volume.Table_Name)
GetItem/Id nNomOriginalValue, sProperties, "OriginalValue"
-- Works just fine
In another Proc to change BackColor if data has changed:
$FieldProperties(Receipt_Volume.Table_Name) = "BackColor=SomeColor"
-- Set BackColor ok, but OriginalValue is lost
-- Anywhere afterwards sProperties = $FieldProperties(Receipt_Volume.Table_Name) only has BackColor Info
The described behavior is normal. With the mentioned statement you always overwrite all field properties. In case you only want to update one (or more) specific properties then you need to specify this with the PropertyList parameter. E,g,
$FieldProperties(Receipt_Volume.Table_Name, "OriginalValue") = "OriginalValue=%%nReceiptVolume%%%"
$FieldProperties(Receipt_Volume.Table_Name, "BackColor") = "BackColor=SomeColor"
For more details see the doc:
> Uniface Reference > ProcScript Reference > Proc: Functions > $fieldproperties
I hope this helps.
Daniel IseliUniface Technical Support
As you have discovered setting the value of $fieldproperties you replace all the current values
There are a number of ways of achieving what you are looking for
Thank you all! Working great now. Been working with Uniface for 21 years and just recently began making use of the advanced Properties.
$fieldproperties (and other "proerties" too) are just simple UnifAce-Item-Lists (UIL)So you can modifiy/read them by
© 2020 Uniface Privacy & Cookies | Privacy Statement | Legal