About Calculate Behaviors

The Calculate behavior enables you to calculate a field's value based on a formula that references other field values. When defining Calculate behaviors on the Calculation Behaviors Properties tabs, you can use XPath expressions to support numeric operations and string concatenations. For example:

XPath Expression Result

../loopback

Set the current field equal to the value found in the ../loopback field

concat('S',instance('interfacedetail')/Port)

Set the current field equal to a concatenation between the letter S and the value found in the Port field that is returned by the peinterefacedetails data provider.

instance('interfacedetail')/portType

Set the current field equal to the portType returned by the interfacedetail data instance provider.

See OSM Concepts for more information about behavior default values, inheritance, and declarative syntax. For more information about XPath specifications, see the World Wide Web Consortium (W3C) website at:

http://www.w3.org/TR/xpath20/

Note:

XPath uses path expressions to select data nodes in XML documents. A path expression with a single dot (.) represents the current node. Two dots (..) represents the parent of the current node. A slash (/) represents the root node.

XPath and XQuery fields are limited to 4000 characters.