Cascading dropdown - multiple records

madpad

Member
I have a question on populating a third element in Table3 based on the values of two other elements.

I have three tables
Tbl 1 {id, Member}
Tbl 2 {id, Member, Period, Subscriptionstatus}
1 12 1 Paid
1 12 2 Paid
1 12 3 UnPaid
(there are three periods, and thus three statuses)
Tbl 3 {id, Member, Period1, SStatus1, Period2, SStatus2, Period3, SStatus3}
1 12 1 Paid 2 Paid 3 Unpaid (This is how I want to retrieve records)

I have made SStatus as a CDD element, but I suspect I should be using php plugin instead. Can someone help how i can accomplish this using Fabrik?

Thanks for any pointers.
 
I'm having trouble understanding your setup. What are your other fieldtypes for Table 3.

Can you also explain what you are trying to achieve as this may help.
 
I simply want to retrieve records from Table to and dump them in the appropriate fields in Table 3.

I want to retrieve Period1, Status1 which is one record, Period2, Status2 which is a second record, and Period3 Status3 which is a third record..all relating to Member 1. I would like to pull all these records from Table 2 into the same record in Table3.


I'm having trouble understanding your setup. What are your other fieldtypes for Table 3.

Can you also explain what you are trying to achieve as this may help.
 
Load a value from a row of data

I found this in Fabrik Wiki for loading a value from a row of data...maybe this is what I need for the above post.

------------
$db = JFactory::getDbo(); $query = $db->getQuery(true); $query ->select('fieldA') ->from('tablename') ->where('fieldC = \'value\''); $db->setQuery($query); $fieldA = $db->loadResult();
--------------------------

When I try it out, it does not calculate anything. Are the fieldA and fieldB
values in the code above should they be placeholders {table1___period1} or just
the field name as in period1?

Also, can 'value\' be a placeholder field? Should it end with a backslash?

 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top