Initializing a timestamp data type in a dropdown list fails

Initializing a timestamp data type in a dropdown list fails

I have a date field in one form and use this data to populate a drop-down list in the second. By using the second form "edit - on load" event, I save the previously selected value in a variable then repopulate the list based on other selected values in the second form. I then try to set the date value back to what I saved in the variable and it fails to work. I end up with a correctly populated drop-down but no value initially selected. This technique works for other data types. If you're able to look at the application it is Home-Care, the form is Patient Evaluation, and the field is Referral Date. I had to remove this code because of the issue: rd = input.Referral_Date; if (count(Patient_Referral[(Patient == input.Patient && Inactive == false)]) == 0) { clear Referral_Date; } else { Referrals = Patient_Referral [(Patient == input.Patient && Inactive == false)]; Referral_Date:ui.add(Referrals.Referral_Date.getall()); input.Referral_Date = rd; }