This topic is locked

Mr. Sergey Kornilov !

9/12/2008 2:44:44 PM
PHPRunner General questions
J
JColtro author

The combo-box named "Current table", in the "Advanced security settings" window is TOO SMALL. I can't see the complete name of the tables.
Tks in advanced.
JColtro

J
Jane 9/15/2008

Hi,
thank you for pointing me to this bug.

We'll fix it in the next update.

P
phpwalker 12/24/2008

Hi,

thank you for pointing me to this bug.

We'll fix it in the next update.


Has this bug been fixed yet?
update: i just downloaded PHP v. 5.0 build 766 ... problem is still happening
Is there any kind of work around? i don't want to have to add the "securityGroup" field into all the "details" records...

J
Jane 12/25/2008

Hi,
it's different issues.

Size of dropdown control in the PHPRunner is not dependent on securityGroup field in the tables.

P
phpwalker 12/25/2008

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...