1 Reply Latest reply on Mar 11, 2009 12:33 PM by marcusedward

    Find Script Help

    anicolais

      Title

      Find Script Help

      Post

      Ok I have a database full of different records. Some of the records have the same contact names but they are a different project. I am trying to create a button that when clicked will search the database for the names on the current record but will find the different projects that they are involved with. The fields are Owner_Name, Rep_Name, and Dev_Name.

       

      Thanks!!!!

        • 1. Re: Find Script Help
          marcusedward
            

          If the names in each type of field only appear in that field (i.e. john smith only appears in owner_name but not rep_name or Dev_name). You script would look like this...

           

          set variable [$owner; yourtable::owner_name] 

          set variable [$rep; yourtable::rep_name]

          set variable [$dev; yourtable::dev_name] 

          enter find mode (do not pause)

          set field [yourtable::owner_name ; $owner] 

          new record / request 

          set field [yourtable::rep_name ; $rep] 

          new record / request 

          set field [yourtable::dev_name ; $dev]  

          perform find

           

          This would find any project that contained the names listed the project that the script was started from.  Then you would just need to add a sort to the end of your script so the result was in the order required.

           

          As another approach you could also add 3 table occurances of the same table and connect them as

           

          yourtable::owner_name = owner list::owner_name

          yourtable::rep_name = rep list::rep_name

          yourtable::dev_name = dev list::dev_name 

           

          then add 3 portals to your layout for each table occurance.  This would provide a list of all three catagories projects where the names matched.  In the portals you could add a go to related record button on the name of the project to navigate to it.   

           

          If Joe Smith appears in any of the 3 fields the find script would get a bit more complicated (but not too bad) and the portal approach wouldn't work 

           

           

          Hope this is helpful,

           

          Marcus