Compare old to new value at validation in LightSwitch
Asked Answered
D

1

6

Is there a possibility to compare the old value to the new one during validation.

Say you have a State on some object that is set to A and changed to B. This should only be allowed if the entity fulfills certain circumstances.

Dirigible answered 2/9, 2010 at 8:16 Comment(0)
B
9

Yes, you can access the original values by drilling into the entity.Details.Properties.[propname].OriginalValue

Beefsteak answered 2/9, 2010 at 17:17 Comment(2)
Can't find "OriginalValue" property in LightSwitch 2013. Any idea how to do this coparison in LS-2013?Millennial
Sorry, solved: entity.Details.Properties.{propertyName}.OriginalValue; I thought "propertyName" should be used as index value for Properties[] set.Millennial

© 2022 - 2024 — McMap. All rights reserved.