2 Replies Latest reply on Feb 28, 2011 8:27 PM by xtremu

    Need help for global field

    xtremu

      Title

      Need help for global field

      Post

      I have two tables, Student and AccessLog

      Relationships = Student:LogID and AccessLog:LogID

      In my Student table, I have gStudentNumber field, type is number and it is global field, If I enter manually or through barcode scanner the StudentNumber of the student on that field, the system record the system time in TimeIn or TimeOut field in the portal and that's work fine. My problem is how to provide the code for this global field to link with (which something like find mode code)?, that when I enter the StudentNumber of the student in the gStudentNumber field it will record the system time and at the same time locate and show the student informantion on thier respective fields, like FirstNane, LastName picture etc.

      Anybody help is much appreciated, I am developing a simple ID system that monitor the IN and OUT of the student in the campus.

      xtremu 

        • 1. Re: Need help for global field
          philmodjunk

          This basic script can be adapted to many different applications. It takes data entered into a global field such as you describe and uses it as criteria to perform a find to pull up any records that match that value. I'm leaving it to you to adapt this script to fit the actual tables and layouts you have in your system:

          Go To layout [//select layout of table to be searched]
          Enter Find Mode[]//clear pause check box
          Set Field [TabletobeSearched::fieldtobeSearched ; YourTable::gStudentNumber]
          Set Error Capture [on] // Keeps "no records found" dialog from interrupting script if no records are found
          Perform Find []
          If [ Get ( FoundCount ) = 0 ]

             // put code here for what should happen if no record was found

          Else If [ get ( FoundCount ) = 1 )

            // put code here when just one record is found

          Else

            // put code here when more than one record is found

          End If

          • 2. Re: Need help for global field
            xtremu

            Thanks Phil, your suggested code integrate and works fine now in my program. thanks a lot

            xtremu