Relationships in Intelligent Advisor #2 – Membership

This is the second in a series of posts about Relationships in Intelligent Advisor. The first post can be found here. When we left the last article we had built a simple design to illustrate the concept of containment relationships or reference relationships. In this second chapter, we will discuss the following ideas and how they might be useful to you on the subject of memberships:

  1. Defining Membership of a Relationship
  2. Using Membership of a Relationship

We saw in the previous chapter that having reference relationships in an interview allows the end user to participate in the selection of members of a relationship. For example, which pet belongs to which family member, and which pet food is for which pet. This concept of membership is an important one. If we think of each relationship as a group (of people, of pets or whatever). But what happens if you don’t want to ask this sort of question of an end user, but you want or need to work it out yourself? For example, you need to group together all the family members who are adults (and those who are children)?

We could of course do something like this InstanceCountIf(the family members, the family member’s age > 18) to extract the family members whose age is greater than 18. But this is only useful in the sense that it tells us how many people there are in that group. If you actually intend to do something with that group, such as make some calculations, examine them in different ways, then it’s not so interesting.

Let’s make a step forward to make an example. How can we deliver the requirement? Begin, as we did before, by creating a new Relationship. Let’s call it the the adult family members.

Membership Set up

In the screen capture above, you can see the instances of the family member with the different people and a small example of a family member with the new information. And you can see also the relationship at the bottom that I created. Here is the detail of how that membership was built:

Membership Rules

The key here is the first rule. The second one should be fairly straightforward since this comes up almost everywhere – the age of a citizen from the date of birth.

“Is a member of” is a great function to leverage membership of a relationship. It is also available in a short format IsMemberOf(). But let’s look at the long version we have here. A given family member is considered a member of the “adult family members” group if they meet the conditions. And selecting the relationship in the debugger allows us to see the rules have done their job.

As you can see above, the relationship is defined in the normal way. The relationship is just like the existing relationship which groups all of the family members but this time it is called the adult family members. And it is up to us to define how to become a member of the group – which we do in that first rule that defines the conditions of membership. So it looks like this in the debugger.

Note the three key points – this relationship is inferred by your rule, so the developer (or the end user, when we finally get round to sharing this information with them) cannot change the results here. The only way to change the results is to change the rules. Secondly, we are not creating family members here – you can see that these three family members were created normally at the top of the debugger window. Finally, the View decision button lets you check why these family members are in this group.

Now that we have our group defined and available to us, we can use it like any other relationship:

InstanceCount(the adult family members)

In fact this membership can be used in your rule in just the same way as any other. And the relationship can also be used as a condition itself:

In the third part of this series, we will discuss a feature that should make more sense when we look at an example, but it is the concept of a reverse relationship. If a pet belongs to a family member, we can describe that in two directions ; “The family member’s pet” or “the pet’s family member”. And many of us who have pets will understand that this is useful. But obviously in a real scenario, if I’m looking at family members and their visits to the clinic, then it can be useful to look at a visit to the clinic and look for the family member to whom it belongs. Membership can be interesting in both directions. More in part three of this back to basics series!

Richard Napier

Author: Richard Napier

After 8 years in case management and ERP software roles, Richard Napier joined Siebel Systems in 1999 and took up the role of managing the nascent Siebel University in Southern Europe. He subsequently was Director of Business Development and Education for InFact Group (now part of Business & Decisions) for 8 years. He now runs Intelligent Advisor IT Consulting OÜ. Owner of, he also is Co-Founder of the Siebel Hub.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Intelligent Advisor IT Consulting Serving Customers Worldwide
Hide picture