[SOLVED] Set a Power table to a range from another dataset dynamically

Good morning,

I have a base dataset of some arbitrary size (maybe 4x8). I also have a template on my screen that I pass a row into. And on the template I have a powertable…

Is there a way to dynamically link a range from the base dataset and display it on the template powertable?

0    1    2    3    4    5    6    7    8
9    10   11   12   13   14   15   16   17
18   19   20   21   22   23   24   25   26
27   28   29   30   31   32   33   34   35

For example, I might pass row 2 into the template which would suggest I’m looking at 18-26 from the base dataset. How would I go about displaying 22-23 on my template powertable?

Thanks for any help here.

I would create a custom property or properties on your main table. You can either pull the individual data points into their own properties based on the selected row or create your own dataset to pass into your template.

To pull data you can use use dataset access functions. If you do individual custom properties than each one would use a function like that to pull in the data you want. I don’t believe you can create a new dataset in an expression.

If you want to create a new dataset then I would do a property change script that again uses the selected row to pull out the data your looking for. Then you create the new dataset and write it to the custom property. The simplest way would be to do individual custom properties though.

In either case you would need to handle when no row is selected. You can use an if and look for the selected row to be greater than -1 or a try should work too since it will fail to return a value if the selected row is -1. Both ways would let you set a default value.

1 Like