This topic is locked
[SOLVED]

 Can groups point to different tables?

1/16/2016 7:08:41 AM
PHPRunner General questions
Tandy author

Is there a way to make a field in the account table be able to point to different tables?

I would like to make a site that a new member can join and they can choose a group to be in. Lets say 3 different groups. So in the account table would look something like this:

Table: account

field 1: account_id

Field 2: username

Field 3: password

Field 4: email

Field 5: fullname

Field 6: group
Then in the group they would have a drop down and can pick

group 1

group 2

group 3
each group would have its own table with different fields.
example:
group 1 | group 2 | group 3

ID | ID | ID

carrier name | pilot name | company name

DOT # | duties | broker #

MC # | miles | pick-up

and so on..
What I am trying to do is make different profile accounts. If above will not work is there a way to make one profile table with all the fields and then when someone joins and picks a group have some fields that do not mach that group be hidden? If that makes sense.
Thank you for any kind of input on this matter..

James

Tandy author 1/16/2016
Tandy author 1/16/2016

Well I guess that wont solve my whole problem. I still need permissions. So my question is? Is there a way to have someone that is joining the site to be able to pick a membership group so they can only use certain tables of the site?

Tandy author 1/17/2016

Ok I have my account table with the main registration fields of
ID

Username

Password

Email

Fullname

Group
Now I went off an in security I made it dynamic permissions.

I then built the site and went to the admin page.

There I set 3 groups = Carrier, Escort, Shipper

I then went back into phprunner and in the editer page I clicks on groups and set a lookup wizard. In the lookup wizard I used Table: uggroups and the link and display fields as: Label

I did a full re-build and tried it out.
That did not work because when I click on the group Carrier it still puts in in the <default> group and not in the Carrier? How do I let them be placed in that group they pick?
Thank You for any help on this.

James Tandy

D
DealerModulesDevClub member 1/17/2016

I am not sure if this would help but take a look at:

http://xlinesoft.com/articles/alumni.htm
Instead of the alumni based on the year field, can you base it on the group field and set each group, Carrier, Escort, Shipper to see different queries that will filter only the fields that you want each group to see?
Might be pointing you down the wrong road but just throwing out an idea.
Paul

Tandy author 1/17/2016

Thank You Dealer Modules, I don't think that will help..

I have the groups and settings figured out.. I would like them to choose the group when they register on the site. I have a drop down list in my account table with the database list of the uggroups Table. But when they pick the group and finish registering. They still get placed in the <default> group instead of what they picked.

Tandy author 1/20/2016

Well Thanks all.. I take it it can not be done.. I have tried everything I can think of..

G
g_parry 1/20/2016



Well Thanks all.. I take it it can not be done.. I have tried everything I can think of..


Create 3 views - show only the data you want in these views - allocate permissions to the views

Tandy author 1/20/2016

I know about the views part.. But that is not the problem. The problem is that I need different permissions for different tables for different groups.. I would just like to find out how they can pick a group to join when they register and are put into that group with out me having to go into the admin page to put them there.. I read somewhere that all I had to do in the account table with the username, password and so on is put a group table in there then go to the edit part and make it a lookup pointing to the uggroups. Sure they can pick the group but it does not place them there.. It still sends them to the <Default> group instead..

Sergey Kornilov admin 1/20/2016

Make Group field part of your registration page. Make it a dropdown with three options it it: Carrier, Escort, Shipper. Users will pick one of the groups while registering and problem is solved.

Tandy author 1/21/2016



Make Group field part of your registration page. Make it a dropdown with three options it it: Carrier, Escort, Shipper. Users will pick one of the groups while registering and problem is solved.


How does that put them into the uggroups of the dynamic permissions?

Tandy author 1/29/2016

I can not seem to find a way that when someone registers to have them pick a group and be put into the under the uggroups table? I am using the Dynamic Permissions in the PHPRunner Enterprise 8.1.
in my users table I have:

username

password

email

fullname

groupid

active
I have built the site and logged in as admin. Made my groups on the site:

Person

Shipper

Carrier

Pilot Car
I then went back to PHPR and

Under the groupid I I have edit as:

I have chosen lookup wizard and picked database table:

Then I am using the uggroups as the table, GroupID as the Link field, and Label as the Display field.
I then build the site and test it out. I tried to register and new account and picked Personal

The site put me in default and not into the personal group?

Is there a way that when someone picks the group they are then automatically put into that group and the admin does not have to go into the admin page and place them into that group?
Thanks for any kind of help I could get here..

James