3 Replies Latest reply on Apr 25, 2015 9:33 PM by Sean_Wilson

    How do you create a searchable property list?

    derrickp64074527 Level 1

      I am trying to create a searchable database of historic military figures. It will be a permanent list of people that will not change. I need to be able to search the list by first and/or last name and create a selectable list. Once a search list is created you can click on a name to display all the data on that person. Also there should be an option to browse the entire list. The original 1000 name list is provided in an excel document. I am having a brain freeze on this. Any examples would be helpful. Thank you!

        • 1. Re: How do you create a searchable property list?
          Sean_Wilson Adobe Community Professional

          The simplest option might be to use a genuine database instead of a property list. For example, there's a free xtra from Valentin Schmidt for this (SQLite xtra)

           

          Otherwise, you might create a list of property lists, with named properties being keys to search on, something like:

          lData = []
          lPerson = ["firstname": "Stonewall", "lastname": "Jackson", "data": "Some data you wish to record against this person's name"]
          lData.append(lPerson)
          lPerson = ["firstname": "Robert", "lastname": "Lee", "data": "Some data you wish to record against this person's name"]
          lData.append(lPerson)
          

          -- etc…

          • 2. Re: How do you create a searchable property list?
            derrickp64074527 Level 1

            Thank you, Sean, for the reply. I will definitely check out the SQlite xtra. But have you seen any examples with more info of using a property list? That intrigues me to be able to not depend on an xtra if possible. I did a similar setup back in director 8.5 and used an xtra that is no longer made or supported. So this is why I hope to avoid using one. Thank you again for your help. Glad to know there are still some Director people out there.

            • 3. Re: How do you create a searchable property list?
              Sean_Wilson Adobe Community Professional

              Nope, I can't provide more info or examples.

               

              However, it becomes a (relatively simple) coding exercise to iterate through a list of property lists looking for named items (or close matches). I don't know how many "fields" (i.e. named properties) you require per entry, or which ones you'll search on — but you can certainly get by without an xtra if you don't want to use one (even though the example I suggested is cross-platform, works in D12, and is free). If you were to provide a couple of examples I might find the time to get you started, assuming that's what you need.