Overriding rules

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
vinsnash
Posts: 415
Joined: Sun Oct 07, 2007 4:58 pm

Overriding rules

Post by vinsnash »

I have a set of two rules that cover 90% of situations. When creating an instance the rules set two attributes depending on a third which is calculated first. This is working nicely. There are occasions when the 'rule' values need to be overridden during creation.

The two dependent attribute are list boxes with the allowed values. After the values are calculated by the rules, if I change them by selecting another value from the list box they revert to the 'rule' values as soon as I visit another attribute field.

Can I somehow have my cake and eat it too?

Thanks for any help.

Vins Nash
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Sounds like you should add IS NEW condition to this rule.
Tom - V8.8 build 3137 - MySql / PostGres
vinsnash
Posts: 415
Joined: Sun Oct 07, 2007 4:58 pm

Post by vinsnash »

The rule does use the "IS NEW" condition. The attributes can be changed after the instance is saved.

I have a thought. Can a "Yes/No" be added to a form that is not an attribute but is only there to aid data entry decisions?

Vins Nash
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Can a "Yes/No" be added to a form that is not an attribute but is only there to aid data entry decisions?
Not sure what you mean by this.

You can have a Yes/No attribute that does not appear on the form.
Tom - V8.8 build 3137 - MySql / PostGres
BobK
Posts: 548
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Post by BobK »

In the conditions of your rules add something like the following

BO.Attribute IS UNDEFINED
Bob
vinsnash
Posts: 415
Joined: Sun Oct 07, 2007 4:58 pm

Post by vinsnash »

Back in my procedural language programming days I could put a button or check box on a form that wasn't included in the "record" but only served to aid in decisions about data being entered or changing the focus to another field out of the tab order etc.

My solution was to add a yes/no attribute with an initial value of 'No'. If the user sets it to 'Yes' then the rule is ignored i.e. If 'YesNo' = 'No' If age < 13 Then MemberType is 'X' ...

Thanks

Vins Nash
RocketRod
Posts: 907
Joined: Wed Aug 06, 2008 4:22 am
Location: Melbourne

Post by RocketRod »

How about you put your Yes/No attribute on the regularuser BO and have a process (buttton) that first sets the attribute to Yes then updates (saves) the BO and resets the attribute to NO. You can use the LoggedInRegularUser in your rules on the BO.

Cheers Rod
vinsnash
Posts: 415
Joined: Sun Oct 07, 2007 4:58 pm

Post by vinsnash »

That sounds like a good idea. It gives a little more security. I can limit overrides by user.

Thanks

Vins Nash
Post Reply