Hello,
I have a bo Contract, that owns multiple objects Member, moreover the identifier Contract.TContractID is stored with every child-object Member, exactly in Member.TContractID.
In Member, there exists Yes/No flag IsMainMember, that can be only for one child-object YES the others must be NO
I added Member-rule:
IF Member.IsMainMember = 'Yes' Then MembersIsMainMember
MembersIsMainMember process looks like following:
###################
input: Bo Member
rule1) FIND ALL Member
rule2)
If Member.TContractID=ThisMember.TContractID AND Member.MemberID<>ThisMember.MemberID Then
Member.IsMainMember='No'
################################
In other words, I search for all Members in this Contract except this-Member and set flag to NO.
THE PROBLEM
When there are 2 Member Objects, the mechanism works fine.
But when there are 3 Member Objects or more, there is a bug. It happens, that 2 Member Objects have the flag set to YES, what is very WRONG.
The log viewer says, that e.g. memberid16 and memberid17 were evaluated to true and 2 actions were added to agenda.
Member16 is being executed and changed to NO correctly
Member17 is being executed but "values wasn't changed.." AND there is the big PROBLEM, Member17 should also be changed.
Please tell me, if this is a bug and how I can implement the issue correctly.
Kind regards
Chris