Conditional rules

Conditional rules

Old forum URL: forums.lhotka.net/forums/t/3919.aspx


bgilbert posted on Tuesday, November 20, 2007

I have a rule for a DateTime property that should only be run when the value is first set by the user and not when it is changed later. What's the best way to accomplish this?

RockfordLhotka replied on Tuesday, November 20, 2007

If "first time" means when IsNew is True then just include the IsNew check in the rule.

If "first time" literally means the very first change they ever make, then you'll need a flag in your object to record that the value has been changed, and then you can use that flag in your rule.

bgilbert replied on Tuesday, November 20, 2007

Rocky,

First time means the first time they edit an existing object fetched from the db.

I'll implement a flag. Thanks.

Copyright (c) Marimer LLC