Expand my Community achievements bar.

Dynamic Table

Avatar

Level 1

I am trying to create a table in LC that will be populated with records from a SQL table.  Sometimes there will be one record sometimes there will be 20-30 records and I need to table to expand to show each record returned in the query.  I can create the table but cant see where to tell it to link to a data source.

Will this need to be done with script or is there something in LC that can do this...and I just havent found it yet?

I appreciate any help on this!

Leon

2 Replies

Avatar

Level 10

You can create a table with one row in it. And set the Row to be repeatable.( As shown in the Image).

For the Binding property of the Row, assign the tag/ field that repeats multiple times at run time. In the attached image, the "prospectLocation" tag is repeating multiple times in my XML. That's why you can see a "[*]" in the binding property.

After that the table row can display data based on the Data Source. If the Data Source returns one row, it will display one row. If it returns multiple rows, it can display multiple rows at run time.

Repeating Row.JPG

Hope this helps..

Thanks

Srini

Avatar

Level 1

Srini,  That helps alot!  I can at least get a record to show up!  Now, my problem is I have 1 records that displays - only the first one, when there should be 10.

I would think that the checkbox to repeat row for each data item would allow it to display the other 9 rows....but still it only shows the first row.  Is there another box Im missing, or is there script that I have to put in now?

thanks!

Leon