I have a form that employees use for recording test results. After they're entered another employee has to go in and approve results.
When the form loads it stores the logged in employee's name in a variable. There's a ComboBox on the form to switch the status from Pending to Approved. The event handler calls this script to save the approver and the date and time.
If ThisForm.Components("StatusComboBox").Value.ToString() = "Approved" and sApprovedBy.Length = 0
ThisForm.PrimaryIDOCollection.SetCurrentObjectProperty("approved_by", ThisForm.Variables("EmpName").Value.ToString())
ThisForm.PrimaryIDOCollection.SetCurrentObjectProperty("approved_time", DateTime.Today.ToString())
But when I go to save the object the values don't get saved. I verified there's data by adding a couple static fields to the form, bound to the object properties. And as soon as that code runs the values are there. But as soon as I click Save everything clears out.
Seems like I'm missing something obvious. Any help would be appreciated.