Hi All,
I want to add an event to the Edit page that if a record is marked as processed, that record's changes are not saved. I am attempting to block any changes made on the Edit page by adding an event under the Before Record Update, that if there is a value in the processed date field (ProcDate), it won't let you save the changes. Attached are some screen shots of the Editor and Events screens in ASPRunnerPro.
With this event, I am comparing to see if ProcDate (Processed Date) is greater that the Dates of Srvc (Service Date), and if so, set BeforeEdit = False. When testing this event function, no matter what the condition, it allows the record to be updated. I have also tried using the following variations if statements to accomplish this function, to no success.
if Not IsNull(value("ProcDate")) then
if Not IsNull(CDate(dict("ProcDate"))) then
if values("ProcDate")>values("Dates of Srvc") then
if CDate(dict("ProcDate"))>CDate(dict("Dates of Srvc") then
(*The last example also clears the ProcDate field when updating.) If I set both sides of the if statement to BeforeEdit = False, it does cause the record not to be updated, so basically my if statement is always returning false when testing the value of the ProcDate field. After 4 hours of trial and error, I'm stumped. Any ideas as to what I am doing wrong? Any suggestions on a better way to create the function I'm looking for? Thanks in advance for any assistance.