Forum Discussion

MichaelHall's avatar
MichaelHall
Qrew Trainee
4 years ago

Single Child to Single Parent

I have created an Equipment (parent) table that has multiple Units (child records) that are associated to each piece of equipment.
One unit can only be associated with one piece of equipment at a time.
 
Is it possible to restrict a unit from being assigned to another piece of equipment if it is already associated with another equipment?
Or possibly it "switches" to the new assigned equipment so it is not associated with 2 or more pieces?
 
Thanks for the input
 
 
 
 
                 Michael L. Hall | Excavation |  Survey Mgr | RPM xConstruction, LLC
        (O) 214-239-4722 - Ext. 4926 | (M) 972-837-3350 | www.rpmxconstruction.com
        planroom@rpmxconstruction.com | mhall@rpmxconstruction.com | surveying@rpmxconstruction.com
        5208 Tennyson Parkway | Suite 130 | Plano, TX  75024   cleanemail***
 
              CONFIDENTIALITY NOTICE - The information contained in this transmission, including attachments, may be (1) subject to the Attorney-Client Privilege, (2)
               attorney work product, or (3) strictly confidential. If you are not the intended recipient of this message, you are notified that you may not disclose, print,
               copy or disseminate this information. If you have received this transmission in error, please reply and notify the sender (only) and delete the message.
               Unauthorized interception of this e-mail may be a violation of criminal law.
 
 
 
 
 
 
 
 
 

2 Replies

  • DonLarson's avatar
    DonLarson
    Qrew Commander
    Michael,

    Do you need to know the history of the assignments?

    In the Parent Child relationship the Child can only have one Parent. You can allow the User to change the associated Parent.  The business case might be moving test equipment around the plant.  The test gear can only be connected to one machine at a time.



    If you want to keep track then you need a different architecture


    You have to build logic into the application to prevent assigning a Unit to a piece of Equipment until the last Assignment is done.   You would do this using a Summary field between the Units and Assignments table on the Record ID# in the Assignment table.


    Here is a screen shot showing this:



    This will tell every Unit if it has an Assignment without a Stop date.


    ------------------------------
    Don Larson
    Paasporter
    Westlake OH
    ------------------------------
    • MichaelHall's avatar
      MichaelHall
      Qrew Trainee
      Hi Don. History would be nice but not necessary. Thank you for the details.
      I will apply them and see if that will control things for me.

      ------------------------------
      Michael Hall
      ------------------------------