Options

Data Exchange between a form and a table

IwanIwan Member Posts: 17
edited 2004-11-28 in Navision Financials
Hi everybody

I should copy a variable value from a form to a table. Everthing works but when I insert a new record then the variable value is set back to the inital value.

Is it possible to store the variable value also during the insert process ?

Or is it only possible to store the value, when I create a new field on the table and store the value in the table befor I insert the new record ?

Please help me ?

Greetings Iwan

Comments

  • Options
    NaviTools.comNaviTools.com Member Posts: 88
    Hi,

    I guess you are using a global variable. I've put a field on 'Resource Card' form (or are you using table form?) I've set its 'SourceExpr' to a global variable.

    Once I enter something into the new field and browse through records, value in the new field doesn't change (this is expected). It stays the same even if I insert a new record.

    Is this what you are doing or did I get it wrong?
    http://www.NaviTools.com
    Documentation for Microsoft Navision
    E/R diagrams, Workflow diagrams, UML diagrams, process diagrams
  • Options
    g_dreyerg_dreyer Member Posts: 123
    You can set the variable to the OnInsert() trigger of the form, i.e.
    FieldInRecord := NewVariableDeclared_DisplayedOnForm;

    I would suggest that you rather use the field in the table as the sourceexpression of the control in the form. Then you don't need to worry about setting the fields in you record using code.

    Regards,
    Gus
Sign In or Register to comment.