Hi,
it's different issues.
Size of dropdown control in the PHPRunner is not dependent on securityGroup field in the tables.
Actually... I was referring to the fact that the advanced Settings does not include all the fields in the query .... here is some email correspondence below, and Jane's work-around which successfully fixes this issue:
> Having a problem with security groups ... phpRunner 4.2 Build 379
>
> I have a table for coaches, another table for agents and a third table for offices
>
> Agents (users) are assigned to offices
>
> Offices are assigned to teams of coaches
>
> Agent table foreignkey == users.officeID
>
> Offices table foreignkey == offices.teamID
>
> Coaches table has a field called teamID, separate primary key == coaches.ID [multiple coaches can be assigned to a particular team]
>
> I want coaches to only be able to see agents that belong to offices that have been assigned to their team.
>
> I have a "view" for the agents table that includes the table Offices with the teamID (see SQL below)
>
> In the Advanced Security settings on the Security page... It appears as though the Main Table: OwnerID Field ONLY gives me access to ONE of the tables in my view.
>
> Here's my SQL for the view
>
> SELECT
>
> users.id,
>
> users.firstName,
>
> users.lastName,
>
> users.addr1,
>
> users.addr2,
>
> users.city,
>
> users.`state`,
>
> users.zip,
>
> users.email,
>
> users.phone,
>
> users.company,
>
> users.password,
>
> users.readTerms,
>
> users.dateCreated,
>
> users.timeCreated,
>
> users.status,
>
> users.userType,
>
> users.welKitShpd,
>
> users.welKitShpDate,
>
> users.FiOSreordershpd,
>
> users.totReorderQty,
>
> users.reorderShpDate,
>
> users.comments,
>
> users.officeID,
>
> users.source,
>
> users.dateModified,
>
> users.W9ReqDate,
>
> users.W9RecvdDate,
>
> offices.teamID
>
> FROM users
>
> LEFT OUTER JOIN offices ON users.officeID = offices.officeID
>
> In the advanced security settings, Main Table drop-down I do not see my offices.teamID field ... I only see all the fields from the users table.
>
***
The Fix:
PHPRunner allows to select fields from main table only.
As workaround you can filter records using "List page: Before SQL query" event on the Events tab.
Here is a sample:
-------------------------------
$strWhereClause = whereAdd($strWhereClause," offices.teamID=".$_SESSION["_offices_OwnerID"]);
-------------------------------
in my case i used the following:
$strWhereClause = whereAdd($strWhereClause," offices.teamID=".$_SESSION["GroupID"]);
hope this helps someone else...