Announcement

Collapse
No announcement yet.

Master Detail Form (with no FK key)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?

  • #2
    Originally posted by weilies View Post
    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?
    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. ?
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      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

      Thanks for enlighten me Albert

      Comment


      • #4
        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.
        Last edited by aducom; 07-09-2014, 05:46 AM.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment


        • #5
          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)

          Comment


          • #6
            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/e10...aq.php?0.cat.6
            Albert Drent
            aducom software netherlands
            scriptcase partner, reseller, support and (turn-key) development
            www.scriptcase.eu / www.scriptcase.nl

            Comment

            Working...
            X