View Canvas Instance Index Number

I am trying to find a way to pull the Index Number of an Instance in the view Canvas for use in expression binding.

the property() function does not seem to have access to the index number of the instance. Having this would greatly accelerate my screen production.

Thank you

An instance of what?

Where do you need this? Inside the nested views? If so, include the instance number in the parameters for the instance and make an input parameter to receive it in each nested view.

These Instance numbers. The image is the of View Canvas property tree.

I am trying to create a dynamic configurable view with this. Each new instance added has its position relative to the previous instance. Each instance is a simple rectangle shaped view.

in my 'top' and 'left' properties for each instance I have this binding:

{this.props.instances[1].top} + {this.custom.convWidth} * {this.custom.instances[2].yRel}

For each new instance I need to open the binding and change the index [#] numbers. Really I just want to copy and paste without the need to open and edit each binding.

The property 'yRel' will typically be either +1 or -1

More information for my current process. I am creating the bindings for 1 or 2 instances as I want them. then I copy the View Canvas to notepad++ and copy paste the structure and then find/replace instance numbers to set the bindings for everything new. I just don't want to click my mouse 1 million times.

Consider dynamically generating this with an iterator expression binding, as is possible with my Integration Toolkit. Perhaps using the lag() function to extract information from the prior instance to use in the current calculation.

(You would move the base list of instances to a custom property, and use it as the source of a forEach() expression on props.instances.)

1 Like