05. V2 – Searching Contacts [6:15]

Description: This video provides an overview of how to search for Apple Address Book contact records within your FileMaker database using the Address Book Manipulator. This video was made with version 2 of the plug-in. Additional search functionality is now available with version 3.

Transcript:

0:0  Thank you for choosing Productive Computing for your FileMaker needs. This video demonstrates the searching capabilities of the Address Book Manipulator plug in. Through out this video I will be working with the Address Book Manipulator demo file.

0:12 I’ll begin by opening the demo file and navigating to the pull tab. Here there are two boxes, one labeled sample search settings and another labeled search function interface. We also have a large button for performing searches, and a portal showing the found contact information.

0:30 The perform search button calls a search function by way of the search script. Looking at the scripts step that actually performs a search, we see that the PCAB Search Function has passed the contents of the fields contained in our search function interface box.

0:48 Lets examine the parameters for the search function via the interface box. The “Type” parameter represents the type of records that we are going to search. Use the string contact to search for contact records or “Group” to search for group records. The “Property” parameter represents the record property that we will search on. The string passed in this parameter names the property. For example, we would use the string First Name to search for the first name property or the string Last Name to search for the last name property. We will examine a couple different properties through out this demo. The “Label” parameter is the label for the property that we might want to limit out search to. If this parameter is included in the search, then the search will be limited to properties with this label only. Example labels are home or work or any custom label that you might assign to a property. The “Key” parameter is reserved for address properties only. Valid values for the key are Street, City, State, Zip and Country. If this value is included, then the searches on addresses will be limited to this part of the address only. The “Value” parameter contains the value that will be compared to the property identified in the property label and key fields. Finally the “Comparison” parameter indicates the type of comparison to make between the property and the value parameters. It can contain any one of the pre-defined comparison operators. Most of the operator’s functionality is self explanatory. For example the Equal operator returns records where the desired property matches exactly the value. Some operators however require more explanation. For example the NotWithinIntervalFromToday looks for properties that have a date or time stamp that is not within a number set of seconds ahead of right now. Please refer to the documentation included in the download for explanations of the operators.

2:47 Now that we have had a cursory explanation of the parameters, let’s view some example search settings. In the Sample Searches box, we see several buttons. These buttons will set the fields in the Search Interface box, so that the search function will return a certain set of records. Let’s try the “By a Zip Code you provide” button. The dialogue box displayed, asks for a zip code to search for. I will enter one that I know exists in my Address Book. Notice that this value is placed in the value field. The properties are set to search for contact records with any address that is in this zip code. After pressing the perform search button, I see that the Apple Computer record is found. To demonstrate the affect of the key parameter, I will set the key to street. The function will perform the same search, but it will only look in the street portion of the address instead of the zip code. The result of the search is the Acme record. Now if I admit the key all together, the function will search the entire address for the sub-string. This should bring back both the Acme and Apple records, like so.

3:56 Now, let’s examine another search. Select the “Has an anniversary within 7 days” button. You will see the search fields are set to search the dates of contact records where the label of the date is anniversary and the date falls within a certain period from today, regardless of the year. We are using 604800 which correspond to the number of seconds in 7 days. If I perform the search, I see that Hale Goodfellow has an anniversary coming up this week. Now if I omit the label, the search will find all dates that are coming up this week, regardless of the label. You will see the search has found Joseph and Hale. If I examine the Joseph record, you will see that the label for the found date is hired.

4:42 Another search I would like to demonstrate is a search for modified records. After pressing the “Contacts modified in the last minute” button, we see that we are searching for contact records with a modified date that falls within an interval around today. This operator actually searches a time frame going back a number of seconds from right now. We will use 60 seconds in the value field. After pressing the search button, we have found that there have been no records modified in the last minute. I’ll modify a record in the Address Book, and perform the search again to see the results. As expected, we have found the modified record.

5:22 Up until now we have only searched for contact records. The last button we will choose we will find contacts based on group membership. Actually the search only finds the desired group record, the demo file, then uses a separate script to iterate through the group members to get their data. Let’s run the example. After pressing the “Find a Group by Name” button, I am prompted to enter a group name. After entering the name, we see that the name is placed in the value field, and the rest of the fields are set to search for group records with the name equal to the one I just entered. After running the search, we will see that one group was found with two contacts that are members.

6:05 This concludes the PCAB Search Function video. Please be sure to view our other videos for further instructions on plug in usage. Thanks for watching.