locked
Generating an Automatic ID RRS feed

  • Question

  • I am currently working on a medical application, to teach my students on how best to use Lightswitch for application development.

    I want each registered patient to have an automatic Patient ID generated for him after registration is complete.

    I could not implement this in Lightswitch. Any help on how to achieve this will be highly appreciated.

    Best Regards.

    Isaac Chukwuemeka

    Monday, February 17, 2014 8:07 AM

Answers

  • All tables have primary keys, so why not use the PatientId for your unique patient id?

    paul van bladel

    • Marked as answer by Angie Xu Monday, February 24, 2014 1:46 AM
    Tuesday, February 18, 2014 7:01 PM

All replies

  • All tables have primary keys, so why not use the PatientId for your unique patient id?

    paul van bladel

    • Marked as answer by Angie Xu Monday, February 24, 2014 1:46 AM
    Tuesday, February 18, 2014 7:01 PM
  • hi!

    if you need this to be automatic, maybe you can do that on server side in "Patient_Inserting()" (or "your entity") method.. there you can apply some logic for your needs.. hth..

    Kivito 


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    Tuesday, February 18, 2014 8:41 PM