docs.intersystems.com
InterSystems IRIS Data Platform 2019.2  /  Class Definition Reference

Class Definition Reference
SqlComputeOnChange
Previous section           Next section
InterSystems: The power behind what matters   
Search:  


This keyword controls when the property is recomputed. Applies only to triggered computed properties.
Usage
To specify when a property is recomputed, use the following syntax:
Property name As classname [ SqlComputed, SqlComputeCode=sqlcomputecode, SqlComputeOnChange = propertynames ];
Where sqlcomputecode is described in SqlComputeCode and propertynames is either a single property name or a comma-separated list of property names. This value can also include the values %%INSERT or %%UPDATE.
Note that you must use the actual property names, rather than the values given by SqlFieldname.
Details
This keyword applies only to triggered computed properties; it is ignored for other properties. (A triggered computed property is a property for which SqlComputed is true and SqlComputeCode is specified, but for which Calculated and Transient are both false. See “Defining a Computed Property” in Defining and Using Classes.)
This keyword controls the conditions under which this property is recomputed. Recomputation can result from:
If the keyword has a value of %%INSERT or %%UPDATE, then INSERT or UPDATE calls, respectively, specify event-triggered computation of the value of the field (property).
Any event-triggered computation occurs immediately before validation and normalization (which themselves are followed by writing the value to the database).
Note:
Event-triggered computation of a field’s value may override any explicitly specified value for the property, depending on the code that computes the property’s value.
Default
The default value for the SqlComputeOnChange keyword is an empty string.
See Also


Previous section           Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-08-16 05:50:13