Holding last value when leaving and coming back to a session

Russ Pease

New Member
I need to be able to hold onto a value selected in a dropdown field until I select it to be something different. This includes leaving the session and coming back to it.

I also have a checkbox that I would like to be able to do the same with.
 

Joseph Kraebel

Administrator
Staff member
Hi Russ,

While in the form you can hold the value in a field by turning off the Clear On Submit option in the AfterScan settings for those fields. To retain this value on a form exit and re-open may be a little tricky to do. If the data is being submitted to the local session with a date/time, you may be able to use a Form Initialize Logic event to execute a sql top statement. Something like:

SELECT TOP (1) FieldX FROM SessionY ORDER BY FieldZ DESC

Field X is the data you want to pull in, Session Y is the session to select it from and Field Z is the field to order by which would be a date/time field.
 
Top