3 Replies Latest reply on Nov 15, 2008 6:26 PM by davidhead

    Relationship via portal help

    vizbanana

      Title

      Relationship via portal help

      Post

      Hi,

       

      I'm trying to setup an inventory database for where I work. I have 2 DB already setup, I have "Users" and "Hardware". The 2 DBs are then integrated into 1 DB file via Tables/Relationships.

       

      Here's how I have it setup as.

       

      I have a layout that contains data from the "Users" DB and a portal that displays data from the "Hardware" DB.

       

      Issue:

       

      The issue is, when I remove a "Hardware" from a "User" using the portal, it deletes the record from the "Hardware" DB to which I don't want and i want to keep it in the inventory in case I need to re-deploy it to an new user.

       

      now my question is,

       

      How can I keep the record from getting deleted from the "Hardware" DB when it is removed from the user via the portal?

       

      I hope I explained ok.

       

      Thanks in advance.

        • 1. Re: Relationship via portal help
          davidhead
            

          Realistically, I think you need three tables - User, Hardware and Allocation. The Allocation table is a join table such that the relationships are:

           

          User ---< Allocation >--- Hardware

           

          You set it up this way to allow multiple allocation records per user and per hardware record. For example, if a laptop is assigned to me, I would have an allocation record that contains my ID, the hardware ID and the start date. The end date would be empty until it was re-allocated. 

           

          If you want to keep the two table structure, you need to 'unlink' the hardware record by deleting the user ID (whatever you used in the relationship). 

          • 2. Re: Relationship via portal help
            vizbanana
              

            Thanks for the suggestion uLaernIT, but it seems like I will be needing more help on doing this.

             

            So, I have the Allcation table setup but I'm having some trouble on retaining the record on the Hardware db when I try to re-allocate it to another User without it being deleted from the Hardware db. 

            • 3. Re: Relationship via portal help
              davidhead
                

              vizbanana wrote:

              Thanks for the suggestion uLaernIT, but it seems like I will be needing more help on doing this.

               

              So, I have the Allcation table setup but I'm having some trouble on retaining the record on the Hardware db when I try to re-allocate it to another User without it being deleted from the Hardware db. 


              Sorry, but you will need to provide more information about what relationships you have set up between the table occurrences in your relationship graph.