DMXzone Database Updater PHP Support Product Page

Solved

Update Datasource Not Happening

Reported 03 Aug 2014 23:52:26
1
has this problem
03 Aug 2014 23:52:26 Julio C posted:
Hello Teodor,
I am trying to update datasource3 ONLY, which is linked to datasource1 and datasource2. This is what I have been doing:

[Repeat Region1]
Content datasource1
[End Repeat Region1]

[Detail Region1]
Repeat1 record ID1 here inside hidden field
[End Detail Region1]

[Repeat Region2]
Datasource2 content filtered by the hidden field inside the detail region1.
Added an UPDATE record text link: Behavior-> "Select Active Record" from repeat region 2 and set to "current selection."

[Detail Region2]
Datasource3 data (responsive to the Update record text link, works perfectly).
Added BUTTON to execute the update with a behavior from the Database Action Executor: Action "RUN" with the proper datasource3 update call.
[End Detail Region2]
[End Repeat Region2]

When I try to update the datasource3, I get a message that record ID1 is required.
When I add record ID1 as a hidden field, no information from Repeat Region2 is displayed, including from Detail Region2. Once record ID1 is deleted, all the information from inside Repeat Region2 is displayed again.

Can you please tell me what I am doing wrong?

Thank you

Replies

Replied 04 Aug 2014 10:53:56
04 Aug 2014 10:53:56 Teodor Kuduschiev replied:
If i understand your explanation right - the Detail Region 2 is inside the Repeat region 2 and also Datasource 3 is in the repeat/detail region of the Datasource 2? This is not right. It would be good if you can provide a link to your page so i can check what exactly you did there
Replied 04 Aug 2014 15:54:26
04 Aug 2014 15:54:26 Julio C replied:
Here is the link: behaviormanagementsystem.com/clientmedsmgmt.php
You may type "Jane" or "John" on the search box.

To make it clear, this is what I am trying to do:
Datasource1 has the identifiable information for the individual, e.g., first name, last name, DOB, etc.

Datasource2 has medication names, and it is linked by clientID to Datasource1. I joined Datasource2 with Datasource3 to display client's current medication dosages (Datasource3 has the client's current medication dosages).

The detail area within Repeat region2 (datasource2) is to be able to update the dosages for Datasource3.
Replied 05 Aug 2014 09:00:17
05 Aug 2014 09:00:17 Teodor Kuduschiev replied:
Your page still looks complicated and i am not exactly sure what are you doing there, but i see in the database action that you included the "jcr_clientid" to be updated, but it receives no value.
Please remove it from the action as it does not need an update, but it is only used for filtering the content..
Replied 15 Aug 2014 17:22:06
15 Aug 2014 17:22:06 Julio C replied:
It is working now. Thank you.

Reply to this topic