2 Replies Latest reply on May 3, 2013 12:00 PM by jared944

    Changing one keyfield in a found set of records

    jared944

      Title

      Changing one keyfield in a found set of records

      Post

           Hello everyone,

           I am producing a simple patient records system. In order to distinguish records that are current (IE - the patient is here, today, right now) and archived, I have a numeric keyfield (Labeled _Current) that will contain either a 1 (current record) or a 0 (archived record). When I check the patient out, I want a script to run that will change all of these 1s to 0s to consider the records archived.

           Currently, this is the way I replace the found set:

           Freeze Window

           Set Variable [$PatientID ; PatientInformation::__PK_PatientID]

           Set Variable [$_Current ; "1" ]

           Go to Layout [Specified Table]

           Perform Find [Restore]

           Replace Field Contents [Specified Table ; "0"]

           Go to Layout [Original Layout]

            

           Every time I run the script, a popup occurs that verifies the "replace field contents." Is there any way to write the script where the popup wont occur? Would I have to create some sort of Set Field Loop? Since I will be doing this with every patient I see, I want to keep the scripts as simple as possible. I fear that a loop script might be too intensive for my database.

            

           Thanks!

            

           Jared