Extended Search Value as Default Value for Add

I have a column with the Ext. Search property checked. If the user populated this field and searched, is there a way to make that the default value if the user decides to add a new record?

Use the Row_Rendered server event to set up the default value. For example:

if (RowType == Config.RowTypeAdd) { // Add row
Field.AdvancedSearch.Load(); // Restore search value from session
Field.EditValue = Field.AdvancedSearch.SearchValue;
}

Stepping through the visual studio debugger it looks like this code should work but it’s not. The field I’m setting the EditValue on is a modal table lookup. I wonder if that needs be handled differently. I’ll poke around. Thanks for pointing me in a direction.

For Lookup use:

Field.CurrentValue = Field.AdvancedSearch.SearchValue;

That worked perfectly. Thanks so much.