Forums

Passing Data

kkurtz 09 Jun, 2020
I am invoking an HTML view from a link on a Joomla content page.
The link correctly calls an event by passing a date to a read action which reads three link tables (Courses, Games, and Reps} and produces {view:pink_sheet_email} which is a list of golf course details which are available on the passed date.
In this listing the golf course name has a link on it coded in HTML. The code for this is :
<a href="index.php?option=com_chronoconnectivity6&cont=manager&conn=monthly-online-entry&courses_id={var:pink_sheet_email.row.Courses.courses_id}&event=view_online_entry" target="_blank">{var:pink_sheet_email.row.Courses.CourseName} - {var:pink_sheet_email.row.Courses.courses_id}</a>
The event view_online_entry is then supposed to read the Courses table to get the specific course named in the link. However the read isn't successful becasue the courses_id is not being passed.
Where am I going wrong.

Thanks,
Karen
kkurtz 09 Jun, 2020
On the prior post I should have mentioned that the debug code correctly shows the courses_id number at the top
[cont] => manager
    [conn] => monthly-online-entry
    [courses_id] => 158
    [event] => view_online_entry

But the where clause for the read shows a blank :
WHERE `Courses`.`courses_id` = ''
Max_admin 10 Jun, 2020
how do you call it in the Read Data settings ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kkurtz 10 Jun, 2020
Parms in read_data action:
Model: Courses
Select type: First matching
Conditions: Courses.courses_id = {data:course_nbr}

course_nbr is defined in a link view as course_nbr={var:courses_list.row.Courses.courses_id} which works when I call an edit form from a list in another series of events in the same connection.
One question: does the URL Parm defined in the link definition work anywhere in the connection even if the actual link is not part of the event steps being used?
Max_admin 10 Jun, 2020
in the {data:} tag you should use the url parameter name, in your debug data before it's shown as "courses_id"
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kkurtz 10 Jun, 2020
OK, that worked. It is finding the correct record in the Courses table.
Now I am trying to relate another table to Courses and it is not eading the second table.
First table setup:

Second table setup:
kkurtz 13 Jun, 2020
Answer
1 Likes
I deleted the old read action and rewrote it. Things are working now.
Karen
Max_admin 14 Jun, 2020
Great!🙂
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.