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.

Michael R.
  • 175
  • 1
  • 7

1 Answers1

9

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

Beth Massi
  • 166
  • 1
  • Can't find "OriginalValue" property in LightSwitch 2013. Any idea how to do this coparison in LS-2013? – Tohid Nov 20 '14 at 18:40
  • Sorry, solved: entity.Details.Properties.{propertyName}.OriginalValue; I thought "propertyName" should be used as index value for Properties[] set. – Tohid Nov 20 '14 at 18:46