4 Replies Latest reply on Mar 13, 2009 4:47 PM by philmodjunk

    Specifying a found set (to FIND)

    R12GS

      Title

      Specifying a found set (to FIND)

      Post

      Hello,

       

      I would like to "find" a found set based on data from a .csv document.    Recotds have a field named "Contact ID".

       

      I want to get a found set of contact IDs: 3454, 3455, 3899, and 4456.

       

      Can I put a set of data such as '3454, 3455, 3899, and 4456' into a field and then "FIND" just those 4 discrete records? 

       

      Thanks!

       

      Tom 

        • 1. Re: Specifying a found set (to FIND)
          philmodjunk
            

          There's a neat trick using a text field and a relationship that can do exactly that for you:

           

          1) Define a text field: IDList

          2) Load the text field with your list of ID numbers separated by carriage returns (There are many ways to do this both manually, via script or through a calculation.)

          3) create a relationship linking the text field to your ID number field.

           

          Now you can pull up your related set of records 2 ways:

          1) create a portal that references the above layout

          2) Create a script that uses go to related record to pull up a found set of your records (Beware the layout specification issue with this step!)

           

          Been using this trick in various forms for years....

          • 2. Re: Specifying a found set (to FIND)
            R12GS
              

            Hello, this sounds pretty good.  Pretty sure I can make it work but here is what I'm trying to do,

             

            I am trying to open a found set of a bunch of records; (thousands).  If I have a file (.xls or .fp7) and export a .csv of "Contact ID"s, I'd like to paste that csv list into a field, and then use a function (or a script) to open all of those records in one found set.  I'd need to create this <CR> separated text string somehow.

             

            Can I edit "find/replace" all the commas (replace with <carriage returns>) in that field?

            • 3. Re: Specifying a found set (to FIND)
              Jade
                

              Hi R12GS,

               

              If I'm not mistaken, Orlando had a scripting solution to a very similar question.  The post is here:

               

              http://fm.lithium.com/fm/board/message?board.id=FM-en-4&message.id=7777 

               

              • 4. Re: Specifying a found set (to FIND)
                philmodjunk
                  

                If you'd rather "build your own" investigate FMP's rich set of text manipulation functions.

                 

                For example, you can use the substitute function in either a looping script or a replace operation to turn commas into carriage returns. When you need to include a carriage return in an expression, use the paragraph symbol (looks a little like a capital 'P') enclosed in quotations marks.