AnsweredAssumed Answered

Detect duplicate record

Question asked by RedzwanLatif on May 31, 2012
Latest reply on May 31, 2012 by philmodjunk

Title

Detect duplicate record

Post

Show Custom Dialog ["Patient Check-In"; "Please enter patient's Ic number"; Patient::gCheckInIC]
If [Get (LastMessageChoice) = 1
   Freeze Window
   Go to Record/Request/Page [First]
   If [Patient::IC = Patient::gCheckInIC]
       Go to Related Record [From table: "Patient"; Using layout; "Patient Page" (Patient)]
   Else
       Loop
         Go to Record/Request/Page [Next; Exit after last]
         If [Patient::IC = Patient::gCheckInIC]
             Go to Related Record [From table: "Patient"; Using layout; "Patient Page" (Patient)]
         End if
       End Loop
    End If
Else
    Go to layout [Main Menu]
End If
Set Field [Patient::gCheckInIC; ""]

Hi. I've done a script to detect duplicate records. But, I need the script to go to the other layout if there is no duplicate record detected. I tried to put "Else" but it didn't work. Can you help me with this script?

Thanks in advance :)

Outcomes