How to create a textbox similar to date filter codes in NAV?

When we type P1, Y1, N1, etc on the date filter, it will automatically change to a date ( P1 => 01/01/06…01/31/06 ).

How can I make a textbox similar to this ?

thanks. :slight_smile:

OnAfterValidate of the field call Application Management MakeDateFilter function passing your field as the parameter.

“Application Management”.MakeDateFilter(FieldValue)

T

It works. thanks :slight_smile:

I would also recommend in the same triiger to define a record of table Date and put the new filter on “Starting Date”, just in order to check the correctness of filter, because MakeDateFilter function doed not do that, so you can easily enter errorneous filters like ‘t…01’ :):

recDate.SetFilter(“Starting Date”, FieldValue)