Fill in the No. field at runtime

sridharsridhar Member Posts: 171
Dear Friends,

I have a card form "Deposit Card"(Table : Deposit) and I have a List form "Depositor List"(Table : Depositor).

I have a Save button in the Card form, so when I click the Save button all the field values except the No. field should be stored in the Depositor table(since the Depsoior table has a seperate No. Series generation range).

So how do I fill in the No. field at runtime (When I click the save button) corresponding to each record.

Thanks & Regards,

N.Sridhar

Comments

  • krikikriki Member, Moderator Posts: 9,118
    Have a look in the item table. Also there a numberseries is used. You can copy the code from there. Then you can do this to have the primary key filled up automatically:
    CLEAR(recMyTable);
    recMyTable.INSERT(TRUE); // the INSERT-trigger fills up the field "No."
    recMyTable."Some Other Field" := "Some Other Value";
    ...
    
    recMyTable.MODIFY(TRUE);
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • sridharsridhar Member Posts: 171
    Hi Kriki,

    Thank you very very much. Its working.

    Regards,

    N.Sridhar
Sign In or Register to comment.