DMXzone App Connect Data Traversal Support Product Page

In progress

dmx-repeat only show first record repeating itself

Reported 21 Feb 2019 15:33:17
1
has this problem
21 Feb 2019 15:33:17 EDUARDO PEREZ posted:
Hi. I'm trying to show the records of a database in rows, but the repeater code "dmx-repeat" only shows the first record repeated as many times as there are records in the table.

<tr dmx-repeat:repeat1="prueba.data.query1">
<td>{{prueba.data.query1[0].nombreuser}}</td>
<td>{{prueba.data.query1[0].apellido1user}}</td>
</tr>

This is the result

Row1: USER1
Row2: USER1
Row3: USER1

instead of

Row1: USER1
Row2: USER2
Row3: USER3

The table used is not corrupted since it happens the same with any table that I use and also in MySQL workbench shows all the records correctly.

Some time ago, everything worked perfectly. I recently updated Adobe Dreamweaver CC 2018 to CC 2019. Could this be the problem? I am desperate, I have uninstalled and reinstalled MySQL thinking that it could be a problem. I have noticed that the select fields do correctly show all the records when they take the data.
Please, could you help me?
Thanks in advance.

Replies

Replied 22 Feb 2019 15:00:41
22 Feb 2019 15:00:41 Teodor Kuduschiev replied:
Hello,
It's because of the bindings selected in the repeat region. They point to the first record.

Wrong: {{prueba.data.query1[0].nombreuser}}
Right: {{nombreuser}}

I believe when binding data you've picked the data wrongly from under server connect component and not the bindings available under repeat region.

Reply to this topic