4 Replies Latest reply on Dec 2, 2011 12:57 PM by EdgarGarcia

    find a record

    EdgarGarcia

      Title

      find a record

      Post

      hi,

      i have a problem, i need to find a product using a global field.

      example:

      i have a table called "products" in this table i have a global field called "search id"

      i need to find a product id using information in search id.i used quick find but is not exact i need to fin a record in other table called products_database but i need only tha recod not others similar because this record is unique.

      any can help me

        • 1. Re: find a record
          philmodjunk

          IN a manual find you can do this and not even need the global field:

          Enter find mode

          Put ==9873 in to your ID field

          Click Perform Find

          and it will find all records with exactly 9873 in the ID field.

           

          In a script, it will look like this:

          Go To layout [Products ] //specify a layout based on the table you wish to search unless you are already on such a layout
          Enter find mode [] // clear the pause check box
          Set field [Products::ProductID ; "==" & YourTable::Search id]
          Set Error capture [on]
          Perform Find []

          • 2. Re: find a record
            EdgarGarcia

            thacks but i need a show custom dialog if a cant find anything througt this search.

            can u help me and retorn in my actual table

            • 3. Re: find a record
              philmodjunk

              i need a show custom dialog if a cant find anything througt this search.

              Go To layout [Products ] //specify a layout based on the table you wish to search unless you are already on such a layout
              Enter find mode [] // clear the pause check box
              Set field [Products::ProductID ; "==" & YourTable::Search id]
              Set Error capture [on]
              Perform Find []
              If [ Get ( FoundCOunt ) = 0 ]
                 Show Custom Dialog ["no records were found"]
              End If

              and retorn in my actual table

              What table would that be? You've not described any table from your actual database so I've named it "Products" in this example. You would alter this script to refer to your table in each place where I've used "products" as the table name. The same would go for the Go TO Layout step (if you use that step.).

              • 4. Re: find a record
                EdgarGarcia

                 thaks friend.