Dynamic Flex Repeater - dataset binding with instances

Hi there I am trying to bind a dataset to a flex repeater instances.
I have the same problem as

first I got Object found Array expected error
so I put in the script

and now I got the array found and object not found.

I am not familiar with this perspective and would appreciate if someone can show me how I can fix this?

cols in line 5 is being overwritten by the integers from `range()`` in line 6.

A few of things about your script:

  1. @pturmel is correct about your cols variable being overwritten.
  2. You also don’t need to “manually” set the property to which you are applying this binding result.
  3. You’re getting object not found because you’re making a list of lists, when you really want a list of objects.
	instances = []
	column_headers = system.dataset.getColumnHeaders(value)
	for row_index in range(value.getRowCount()):
        # Right here you want an object/dict - not a list
		row_data = {}
		for column_index in range(value.getColumnCount() - 1):
		    row_data[column_headers[column_index]] = value.getValueAt(row_index, column_index)
    # note here that I am simply returning the instances, instead of assigning them
    # directly to the property
	return instances
1 Like

Thank you for the neat step by step explanation. and also thank you @pturmel.
Yes it worked and I now see how it is structured and how to manipulate it.
I just started with Perspective with minimal knowledge but I am starting to like it :smiley: :+1: Not as intimidating as i thought The presentation and sizing are cool with Perspective compare to Vision.