HTML5 Data Bindings Support Product Page
Answered
Repeat region
Asked 10 May 2014 18:49:25
1
has this question
10 May 2014 18:49:25 Julio C posted:
Hello Teodor,Could you please give me an idea of what I am doing wrong?
I tried to also follow Steve's instructions ( www.dmxzone.com/support/21863/topic/59533/ )
but I cannot make my data work -> behaviormanagementsystem.com/clientmgmt.php
I wil truly appreciate you help.
Thank you.
<table class="table">
<thead>
<tr>
<th> Name </th>
<th> </th>
</tr>
<tr data-binding-repeat="{{ClientInfoObject.data}}" data-binding-id="repeat1">
<th><p>{{ClientName}} {{ClientLastName}}</p>
<p>{{ClientID}}</p>
<p> </p></th>
<th> </th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<table border="4" data-binding-detail="repeat1" data-binding-id="detail1">
<tr>
<td width="41"><input name="ClientID" type="hidden" id="ClientID" data-binding-value="{{ClientID}}" ></td>
<td width="172"> </td>
</tr>
<tr data-binding-repeat="{{BxPlanTitleObject.data}}" data-binding-id="repeat2">
<td> </td>
<td><div data-binding-id="repeat3" data-binding-repeat="BxPlanTitleObject.data">{{BxPlanName}}</div></td>
</tr>
</table>
Replies
Replied 07 Jun 2014 20:32:12
07 Jun 2014 20:32:12 Julio C replied:
Hello Teodor,
I just modified the question, but the issue is the same.
I have 2 data sources, the first data source is used as basic client info.
The second data source is supposed to repeat detailed information. It is not doing it, and I just don't understand what I m doing wrong.
As always, I appreciate your help.
I just modified the question, but the issue is the same.
I have 2 data sources, the first data source is used as basic client info.
The second data source is supposed to repeat detailed information. It is not doing it, and I just don't understand what I m doing wrong.
As always, I appreciate your help.
Replied 09 Jun 2014 10:01:22
09 Jun 2014 10:01:22 Teodor Kuduschiev replied:
Hello Julio,
It is not really clear what exactly are you trying to achieve by the code you provided?
It is not really clear what exactly are you trying to achieve by the code you provided?
Replied 10 Jun 2014 03:26:24
10 Jun 2014 03:26:24 Julio C replied:
This what I need to do in tables:
Data source "ClientInfoObject" needs to echo clients' basic info: Client ID, Client Name, Date of birth, etc.
Data source "BxPlanTitleObject" contains several areas that the client needs to work on. In other words, "BxPlanTitleObject" must repeat several records linked to "ClientInfoObject" by Client ID#, e.g., Client1 basic info echoed and area1, area2, area3, area4 echoed within the same page.
"ClientInfoObject" works as expected within the sample code:
<table class="table">
<thead>
<tr>
<th> Name </th>
<th> </th>
</tr>
<tr data-binding-repeat="{{ClientInfoObject.data}}" data-binding-id="repeat1">
<th><p>{{ClientName}} {{ClientLastName}}</p>
<p>{{ClientID}}</p>
<p> </p></th>
<th> </th>
</tr>
</thead>
<tbody>
</tbody>
</table>
\\To echo "BxPlanTitleObject" records, I added a detail region to a table:\\
<table border="4" data-binding-detail="repeat1" data-binding-id="detail1">
<tr>
\\AND as per Steve's notes, I added a hidden field for ClientID and added the filter in the database data bindings for ClientID:\\
<td width="41"><input name="ClientID" type="hidden" id="ClientID" data-binding-value="{{ClientID}}" ></td>
<td width="172"> </td>
</tr>
\\THEN I added a repeat region within the <tr> tag for the "BxPlanTitleObject":\\
<tr data-binding-repeat="{{BxPlanTitleObject.data}}" data-binding-id="repeat2">
<td> </td>
\\HOWEVER, when I add the data binding from "BxPlanTitleObject" {{BxPlanName}} to the <td> tag, I get a message that I am trying to add the info without a repeat region and then another repear region is added automatically:\\
<td><div data-binding-id="repeat3" data-binding-repeat="BxPlanTitleObject.data">{{BxPlanName}}</div></td>
</tr>
</table>
The webpage echoes only the data for "ClientInfoObject" but not for "BxPlanTitleObject".
I just cannot figure out how to make this work and it is extremely frustrating...
Data source "ClientInfoObject" needs to echo clients' basic info: Client ID, Client Name, Date of birth, etc.
Data source "BxPlanTitleObject" contains several areas that the client needs to work on. In other words, "BxPlanTitleObject" must repeat several records linked to "ClientInfoObject" by Client ID#, e.g., Client1 basic info echoed and area1, area2, area3, area4 echoed within the same page.
"ClientInfoObject" works as expected within the sample code:
<table class="table">
<thead>
<tr>
<th> Name </th>
<th> </th>
</tr>
<tr data-binding-repeat="{{ClientInfoObject.data}}" data-binding-id="repeat1">
<th><p>{{ClientName}} {{ClientLastName}}</p>
<p>{{ClientID}}</p>
<p> </p></th>
<th> </th>
</tr>
</thead>
<tbody>
</tbody>
</table>
\\To echo "BxPlanTitleObject" records, I added a detail region to a table:\\
<table border="4" data-binding-detail="repeat1" data-binding-id="detail1">
<tr>
\\AND as per Steve's notes, I added a hidden field for ClientID and added the filter in the database data bindings for ClientID:\\
<td width="41"><input name="ClientID" type="hidden" id="ClientID" data-binding-value="{{ClientID}}" ></td>
<td width="172"> </td>
</tr>
\\THEN I added a repeat region within the <tr> tag for the "BxPlanTitleObject":\\
<tr data-binding-repeat="{{BxPlanTitleObject.data}}" data-binding-id="repeat2">
<td> </td>
\\HOWEVER, when I add the data binding from "BxPlanTitleObject" {{BxPlanName}} to the <td> tag, I get a message that I am trying to add the info without a repeat region and then another repear region is added automatically:\\
<td><div data-binding-id="repeat3" data-binding-repeat="BxPlanTitleObject.data">{{BxPlanName}}</div></td>
</tr>
</table>
The webpage echoes only the data for "ClientInfoObject" but not for "BxPlanTitleObject".
I just cannot figure out how to make this work and it is extremely frustrating...
Replied 10 Jun 2014 09:45:53
10 Jun 2014 09:45:53 Teodor Kuduschiev replied:
Hello Julio,
The error i see on your page ... your second repeat region cannot be inside the detail region that you created from your first repeat region.
Your structure should be like:
[Repeat1]
Content
[End Repeat1]
[Detail Region]
Repeat1 record ID here inside a hidden field
[End Detail Region]
[Repeat Region 2]
Content filtered by the hidden id inside the Detail region
[End Repeat Region 2]
The error i see on your page ... your second repeat region cannot be inside the detail region that you created from your first repeat region.
Your structure should be like:
[Repeat1]
Content
[End Repeat1]
[Detail Region]
Repeat1 record ID here inside a hidden field
[End Detail Region]
[Repeat Region 2]
Content filtered by the hidden id inside the Detail region
[End Repeat Region 2]
Replied 10 Jun 2014 18:07:11
10 Jun 2014 18:07:11 Julio C replied:
I added the detail region separate and added a hidden field for datasource1 {{ClientID}}.
I added a separate repeat region for datasource2.
In Database Source Query Buider, I joined datasource1 and 2 by Client ID and filtered datasource 2 in the Database Source Query Buider by datasource1 clientID. The webpage output did not echoed datasource2.
I deleted the join of datasource1 and 2 in Database Source Query Buider and filtered datasource2 in "Filters" with datasource2 clientID. Still no luck, I cannot make the page echo datasource2.
I am trying to look at the several examples you guys provide on your website but I just cannot find any examples explaining how to echo several separate repeating datasources linked by one datasource object ID, in my case, by client ID#. All the examples seem to suggest that everything comes from a big single data connection source - or at least that's how I understand the instructions. And it is frustrating...
I added a separate repeat region for datasource2.
In Database Source Query Buider, I joined datasource1 and 2 by Client ID and filtered datasource 2 in the Database Source Query Buider by datasource1 clientID. The webpage output did not echoed datasource2.
I deleted the join of datasource1 and 2 in Database Source Query Buider and filtered datasource2 in "Filters" with datasource2 clientID. Still no luck, I cannot make the page echo datasource2.
I am trying to look at the several examples you guys provide on your website but I just cannot find any examples explaining how to echo several separate repeating datasources linked by one datasource object ID, in my case, by client ID#. All the examples seem to suggest that everything comes from a big single data connection source - or at least that's how I understand the instructions. And it is frustrating...
Replied 11 Jun 2014 16:11:29
11 Jun 2014 16:11:29 Teodor Kuduschiev replied:
Hello Julio,
All you need to do is:
1. Setup to different data sources. NO joins or anything like this.
2. Add a repeat region from your first data source on the page and create a detail region from it. Add a hidden field in it
3. Add a second repeat region from the second data source and filter it by the hidden field inside the detail region.
IT IS IMPORTANT to make sure you are using proper $FORM.NAME for filter - on your current page your filter for the data source has a different name than the hidden field name.
All you need to do is:
1. Setup to different data sources. NO joins or anything like this.
2. Add a repeat region from your first data source on the page and create a detail region from it. Add a hidden field in it
3. Add a second repeat region from the second data source and filter it by the hidden field inside the detail region.
IT IS IMPORTANT to make sure you are using proper $FORM.NAME for filter - on your current page your filter for the data source has a different name than the hidden field name.
Replied 14 Jun 2014 01:48:42
14 Jun 2014 01:48:42 Julio C replied:
It is fixed. The main issue was indeed the $FORM.NAME.
Thanks for your help. Please bear with me that I will be asking you additional questions as I encounter other issues (mainly on data bindings I think)...
Thanks for your help. Please bear with me that I will be asking you additional questions as I encounter other issues (mainly on data bindings I think)...