Skip to main content
Version: 8.1

Expression Structure Bindings in Perspective

Inductive University

Expression Structure Binding

Watch the video

What Is an Expression Structure?​

An Expression structure is an object type of property where several of the sub-items get their values from expression bindings.

An Expression Structure bindings allow us to create a custom Expression binding where several expressions give you several values. That is, the output is an object rather than a value. This binding type is useful in configuring parameters for a script transform, or in cleanly creating a complex object from a single binding. It enables you to create a data structure using a separate expression to populate each entry in the structure.

Binding Interface​

The Expression Structure binding is configured similarly to any object in Perspective, except that every value property in the object is evaluated via an individual expression.

Binding Properties​

Property NameDescription
EnabledIndicates whether the binding should fire.
Overlay Opt-OutIndicates whether the component should reflect a bad quality binding via a tag overlay.
Wait On AllIndicates whether the binding should wait for every expression binding in the structure to finish before completing. If false, each expression in the structure will resolve individually and update their properties at that time. If true, all component properties will receive their new values at the same time.

Example​

  1. Create a new memory Tag called NewTag1. Set the following:

    • Data Type: String
    • Value: It Works!
  2. Click OK to save the Tag.

  3. Create View called MyParentView.

    1. Place a Carousel component and a Label component on the view.
    2. Set the label text as "Parent View."
  4. Create another view called MyChildView.

  5. Place a Label component and an Icon component on the view.

  6. Now we need to add two view parameters MyChildView.

    1. In the Property Editor under PARAMS, click Add View parameter and select the Value option.

    2. Change the word "key" to the parameter name we want, which is "iconPath."

    3. Click Add View Parameter again.

    4. Name the second view parameter "labelText."

  7. Next we'll bind the components to the view parameters. On MyChildView, select the Label component.

    1. Click the Binding icon next to the text property.

    2. Select the Property binding type.

    3. Click the Property Editor icon.

    4. Scroll down to the labelText view parameter. Click OK. Click OK again to save the binding.

    5. Select the Icon component.

    6. Click the Binding icon next to the path property.

    7. Select the Property binding type.

    8. Click the Property Editor icon.

    9. Scroll down to the iconPath view parameter. Click OK. Click OK again to save the binding.

  8. Back on MyParentView, select the Carousel component and set the viewPath property to MyChildView.

  9. Next we need to add two view parameters. Still on the MyParentView, click the Binding icon next to viewParams. The Edit Binding screen is displayed.

  10. Choose Expression Structure as the binding type. Click Add Object Member... and select Value.

  11. Name this parameter iconPath.

  12. Click the Expression icon, then enter "material/insert_emoticon" as the expression. Click OK.

  13. Click the Expand icon and select Value to add another parameter.

  14. Name this next parameter labelText then click the Expression icon.

  15. For the value, click on the Tag icon then choose the tag. Click OK.

  16. Select the Wait On All option. This will ensure that all expressions provide a value before this binding will publish its initial value.

  17. Click OK to save the binding. Now the label text we're using in MyChildView will be populated by this tag (NewTag1).