Imagine I have a BO called MyData. I have two attributes..... DataValueCurrent and DataValuePrior
Whenever the BO is Modified DataValueCurrent gets updated in the BO Rules.
I need to save the value of DataValueCurrent into DataValuePrior BEFORE the Rule that updates DatValueCurrent.
At the moment, both end up being updated to the new Current value so seems that because both rules update the BO, then they get rerun.
I have tried to implement OLD_VALUE but that seems like it is for Form editing rather than Rule update.
Any ideas here would be helpful please.
Saving Attribute Value Prior to Being Updated by Rules
-
- Posts: 2391
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Saving Attribute Value Prior to Being Updated by Rules
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
-
- Posts: 2391
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: Saving Attribute Value Prior to Being Updated by Rules
Scrub that.... Solved it..... Was simpler than expected.....
Two BO Rules.....
RULE 1: Update Prior
IF NOT(MyData.DataValueCurrent WAS CHANGED)
MyData.DataValuePrior=MyDataDataValueCurrent
RULE 2: Update Current
MyData.DataValueCurrent=NewValue
Two BO Rules.....
RULE 1: Update Prior
IF NOT(MyData.DataValueCurrent WAS CHANGED)
MyData.DataValuePrior=MyDataDataValueCurrent
RULE 2: Update Current
MyData.DataValueCurrent=NewValue
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....