2 Replies Latest reply on Feb 27, 2009 1:48 AM by diquito

    Imported search...

    diquito

      Title

      Imported search...

      Post

      Hi,

      I want to import a list with specific values.. and then I want to make a search in a table for these values... is it possible to do this automatically??

      I mean I just execute a script that does it.. how should the script look like??

       

       

        • 1. Re: Imported search...
          Orlando
            

          Hi Diquito

           

          If you are importing a single set of values to search upon then you best move would be to create a separate table that your script will import into, temporarily store the data, generate your search query and the delete the data after and finally present you with the result.

           

          In the script I have put together below the table to store the temporary import is called 'IMPORT' and the table you are searching on is called 'SEARCH' and the field 'SearchTerm'

           

          The script should look something like this:

           

          # 
          Set Error Capture [ On ]
          # 
          Go to Layout [ “IMPORT” (IMPORT) ] 
          Import Records [  ] 
          Go to Record/Request/Page [ First ] 
          Loop 
          Set Variable [ $SearchList ; List ( $SearchList ; IMPORT::SearchTerm ) ] 
          Go to Record/Request/Page [ Next ; Exit after last ] 

          End Loop 
          Set Variable [ $SearchCount; Value:ValueCount ( $SearchList ) ] 
          # 
          #Perform Search 
          Go to Layout [ “SEARCH” (SEARCH) ] 
          Enter Find Mode [  ] 
          Set Variable [ $LoopCount; 1 ] 
          Loop 
          Set Field [ SEARCH::Test ; GetValue ( $SearchList ; $LoopCount ) ] 
          Exit Loop If [ $LoopCount ≥ $SearchCount ] 
          New Record/Request 
          Set Variable [ $LoopCount ; $LoopCount + 1 ] 

          End Loop 
          # 
          Perform Find [  ]
          # 
          If [ Get ( FoundCount ) = 0 ] 
          Show Custom Dialog [ "No records match your request" ] 
          End If 
          #Delete the imported records 
          Go to Layout [ “IMPORT” (IMPORT) ] 
          Delete All Records [ No dialog ] 
          Go to Layout [ “SEARCH” (SEARCH) ] 
          #  

           

           

           

           

           

           

           

           

           If any of this needs explanation please let me know.












          • 2. Re: Imported search...
            diquito
              

            Works perfectly.. thanks a lot..

             

            ///D