1 Reply Latest reply on Sep 17, 2018 6:53 AM by DTurner

    Still struggling with relationships

    blwallace Specialist

      I'm using ISM 2017.3

       

      We are in a somewhat unique situation where we have multiple agencies in our building using one HR department.  We are looking at creating some HR processes that will cover the agencies in the building.  I've created and Agency business object and created my agencies there.  The OOTB already has Department business objects.  I want to link the agencies to the departments.  An agency will have many of the same department names, one such example bing HR will exist across all agencies.  IT would be another Department name that all agencies will have.  So to me it seems I have a Many-to-Many relationship - an agency can be associated to many departments, and a department can be associated to many agencies.  When I create a Department, I want to pick the various agencies to which it will belong.  Here's my approach...

       

      I created an Agency business object

      1. created a Name field to hold the agency name
      2. autogenerated the UI

      Then I created my agencies.

      Next, I created an Agencies pick list pulling the names from my Agency business object as the values.

      Next, on my Department object

      1. created an AgencyLink field
      2. created a relationship AgencyAssocDepartment
      3. created an AgencyName text field
        1. used pick list Agencies from above
      4. modified Department form to use this new AgencyName field
        1. modified control properties of this field to Radio Button

       

      Now, when I create a new Department all my agencies show in the form, but I can only pick one.  I fear I don't fully understand relationship building and link fields.  The link field holds the association value between the Department and the Agency.  The relationship defines the type of relationship and to what object.  But I don't see how the department's AgencyLink link field will hold the multiple Agency values.  It probably doesn't and I'm really missing a key element here.

       

      Hopefully someone can show me the way.

        • 1. Re: Still struggling with relationships
          DTurner Expert

          HI blwallace,

           

          From your description, it sounds like it may be a [Department (One) : (Many) Agency] relationship but I could be misunderstanding your use case. I do think you're after a child tab on the department object though:

          Ensure you have a list and/or form setup for the Agency object.

           

          Access the Department BO from the Admin UI > Layout (select the relevant one if there are multiple) > select the view with type 'Form', usually 'formView'.

          Next, click 'Add child panel', completing the required fields and selecting the relevant Agency relationship when setting the 'Object' value.

           

          The link field control is normally used when you need to select a single specific value from a related record. After configuring the above, you should be able to link multiple records.

           

          Hope this helps & I'll try my best to answer any questions you may have

           

          Declan