Viewing 1 post (of 1 total)
  • Author
  • #31430

    [1] Click TOOLS | SCRIPT EDITOR to show the Script Editor screen
    [2] Locate “frmEditorPatient” and the “OnAfterNewRecord” event
    [3] Copy & Paste the following script into the Script Editor :-

    frmEditorBaseRec Editor = (Params[0] as frmEditorBaseRec);
    // set the database value...
    cPer per = (Editor.Record as cPer);
    per.towncity = "London";
    // update the corresponding visual control...
    DevExpress.XtraEditors.BaseEdit ed = Editor.FindControl("edTownCity") as DevExpress.XtraEditors.BaseEdit;
    if (ed != null) { ed.EditValue = "London"; }

    [4] Click OK

    In the example above, we are setting the Town/City field to default to “London”, but you can change the text between the ” ” to whatever you wish. To test this out, try creating a new patient record and notice that the “Town/City” field will be populated with your default value.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.