1 Reply Latest reply on Nov 23, 2017 4:12 AM by DTurner

    Help with relationships between business objects


      I have created 3 business objects from data extracted from our HR system, the objects are:


      1. All staff

      2. Managers

      3. Directors


      In each business object it lists a bunch of fields:


      employee number, name, email, position number, position title, classification, team, department, reports to position number.


      How do I set up the relationship between these objects to be like the below?


      Relationship should be:


      All Staff (Reports to position number) = Managers (Position Number)

      Managers (Reports to position number) = Directors (Position Number)


      When I try and set relationships within the business objects it only gives me 'recid' as a field to choose to create a relationship from. They don;t have the same recid's so this is useless. What am I missing?


      I need these relationships to be in place in order to set up some forms and workflows based on management authorisation.

        • 1. Re: Help with relationships between business objects
          DTurner Expert

          Hi brittmanjb,


          I am curious if it was a specific design choice to create separate business objects? If so, what are the intended benefits?

          My understanding is that a relationship needs to point to a unique value, this is why we use RecId, a GUID, as a constraint field. Therefore, we can use unique fields or validated fields, which use a business object that have a RecId, in relationships. As the BOs you have created are new objects, it is likely why you can only use RecId as a constraint, taking a look at some of the more prominent BOs such as Incident or Change may help to show this.


          Now I can't say this is the most efficient method, but is how I would go about setting this up.


          Assuming the following cardinality:

          All Staff (Many - One) Managers; Managers (Many - One) Directors


          All Staff would have a ManagerLink field, Managers would have a DirectorsLink field.

          Create new relationships: AllStaffAssocManager (Through fields ManagerLink -> RecId), ManagerAssocDirector (Through fields DirectorLink -> RecId)


          It sounds like you have a 'Reports to Pos #' and a 'Pos #' field. Now, when adding Link Fields to forms, you can select the Display Field. As such, you can select the 'Position #' field at this point in order to link Directors/Managers based on their position number. You can also select a custom label, so this can be seen as 'Reports to' on the layout.


          For further information about relationships, the help documentation may prove useful https://help.ivanti.com/ht/help/en_US/ISM/2017/Index.html#Configure/Relationships/Adding_a_Relationship_to.htm

          For using relationships in expressions and such, the additional documentation may also help https://help.ivanti.com/ht/help/en_US/ISM/2017/Index.html#Reference/Expressions/Field References.htm


          Hope this helps - please feel free to ask any questions