Member Object

For the Member object we have two calculated attributes that we need to enter the rules for – the MemberNumber attribute identifying the unique number of a member in the system and the OutstandingCharges attribute.

The unique number of a member will be calculated when the member is created and for simplicity will be equal to the number of existing members in the system up to this point (which includes the new member). In the Rule Language format this can be written as1):

IF Member IS NEW THEN 
 Member.MemberNumber = MAX Member.MemberNumber+1 

The rule that calculates the outstanding charges will calculate the difference between the amount of fees that the member has been charged and the amount of payments that he has made. In the Rule Language format this rule looks like so:

Member.OutstandingCharges = SUM Fee.Amount WHERE (Fee IN Member.Fees) - SUM Payment.Amount WHERE (Payment IN Member.Payments) 

Let us now enter these rules into the configuration. This time we will use the “Standard Form” of the rule editor. Bring up the rule dialog as described in the previous section and click on the “Standard form” tab. In the first cell of the green area identifying conditions enter Member IS NEW. In the yellow area indicating actions enter Member.Number=MAX Member.MemberNumber+1. Enter the name of the rule “Membership number” and click on the OK button. As you can see the user interface of the Standard Form allows us not to enter IF and THEN. It will also spare us from having to enter AND if there are multiple conditions.

Enter the second rule with the name “Outstanding charges” using either the Standard Form or the “Textual form”. There are no more rules for the Member object.


1)
In Aware IM 5.1 this can also be achieved without a rule – just by marking the MemberNumber attribute as “auto-incremented”
  • Last modified: 2022/09/13 18:15