Master Detail Form (with no FK key)

I have a Person app which link with Address, Contact table (children)
I know it’s possible to create master-detail form in a single app.

But what if i have another table/view called person_type (contain employee, client, user etc.)
It has no key link between Person, can i still put it as ‘detail’ app to Person app?

[QUOTE=weilies;25065]I have a Person app which link with Address, Contact table (children)
I know it’s possible to create master-detail form in a single app.

But what if i have another table/view called person_type (contain employee, client, user etc.)
It has no key link between Person, can i still put it as ‘detail’ app to Person app?[/QUOTE]

I don’t think so, but what are you trying to achieve? persontype sounds to me as a select field within a person to allow binding it to the employee table, security table etc. ?

i think my initial intention was wrong.
The table should has a FK for person_id

TABLE: PERSON_TYPE

  • Person_ID
  • Person_Type (user, employee, vendor, student…)

Each Person could be

  • user: to login system
  • employee: to track down their salary, performance
  • vendor: to track their services
  • student: track down score

each Person could be anyone of then, or more than one

i guess this design will work :slight_smile:

Thanks for enlighten me Albert

No I think that this approach is not going to work as persons can have different roles. So I would go for person_type, person_role, person.

Person_role would contain relationship(s) of the person. Other option within Scriptcase is that you have a multiple selectform and a n-m relationship. You could look into that too.

Besides, relationships can have different valid periods, so you should use an effective date construction here too.

only USER can login to SC, so if USER is from Vendor + Student, then the security admin would need to grant “Vendor Group” + “Student Group” to the USER
yeah, i could have make the system complex but i decided the access for USER will based on SYSTEM date.
Anytime the security admin found they do/don’t need to access certain app, they manipulate the “Group”

one of my challange is to come out multiple role (multiple Group in SC)

You can hack the security module, but out-of-the-box a user can have only one user group. You can assign more, but it doesn’t work. On our website you can find the hack in the faq’s:

http://scriptcase.aducom.com/cms/e107_plugins/faq/faq.php?0.cat.6