Filteration issue

subhadynamicssubhadynamics Member Posts: 109
In a screen there are two textboxes,From year and To year. Both are optional fields.Option String starts fromm 2000. On selecting the from year , To year automatically populates by addibg one to the from year.But on saving to the table, the To year is saving as 2000.
what can I do to save the 'To year' which is populated in the To year text box.Can anyone help me.

Comments

  • garakgarak Member Posts: 3,263
    FromYear - OnAfterValidate()

    ToYear := FromYear; //or FromYear + 1, or what else


    Are these two fields only variables on the form or fields in the table?
    How look your source?
    Do you make it right, it works too!
  • DaveTDaveT Member Posts: 1,039
    Hi,

    Is the form based on the table ? you might need to do a modify
    Is the variable the record variable ? you might have to assign and modify

    Can you give sample code if these suggestions don't work.
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • subhadynamicssubhadynamics Member Posts: 109
    'Fromyear' and 'to year' are two variables. In the fromyear field I when I selects the from year the To year field automatically populates with From year +1( eg. If I selects 2007, then 'To year' text box populates with 2008). I want to save the value of this 'to Year'(2008) field to the table field.
Sign In or Register to comment.