filter databasejoin combo

coreinfo

New Member
Hello,
I have the following situation:

orgType {[1,Type 1], [2,Type 2]}
orgElement {[3,direccion],[4, representante],[5, miembro]}
orgTypeElement {[6,1,3],[7,1,4],[8,2,3],[9,2,5]}

Customer {[10,A,1(orgType)],[11,B,2]}
User (byCustomer) {[12,C,10],[13,D,10],[14,E,11],[14,F,11]}

UserTypeElement {orgElementID, UserID}

And now the problem is to filter a databasejoin and display only the orgElements of the user customer's type.

Is it possible to pass a parameter to a form, that is not a element of the form to filter in the databasejoin?

Thanks.
 
I've been thinking around.
I have four lists: Customer, TypeOfOrg, Departments, users.
I also have a list with the relation between TypeOfOrg and Departments which I called OrgDepartments. There is a element in Customer OrgTypeID and another element in users CustomerID.

I need to make a relation between User and OrgDepartments called UserOrgDepartment with 2 elements, UserID, OrgDepartmentID, and here I'm stucked.
 
I don't get your setup, but you can add a SQL condition in the dbjoin's "Joins where and/or order by statement (SQL)", you can use {$my->id} to get the userid of the logged in user.
So something like
WHERE {thistable}.orgTypeElement IN (SELECT foo FROM baa WHERE some_column = {$my->id})
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top