How to create a Query Lookup Filter in DejaOffice PC CRM
From CompanionLink Support
Using DejaOffice PC CRM you can now create Advanced Lookup Filers using SQL Queries.
Contents
Where to find the Lookup Filters
The Advanced Lookup filters can be found in the Following DejaOffice PC CRM Menu:
- Open DejaOffice PC CRM and select Contacts.
- Select the Category Filter Icon (or use the 3 bars in the top right and select Category Filter).
- In the bottom left, select the "Queries" option, this will open the Query Filter Menu.
Note: Using the Category Filter is still the easiest way to Filter records in DejaOffice PC CRM.
Creating a Lookup Filter
To create new filters, from the Query Filter Panel:
- Select "+" to create a new Lookup Filter.
- In the top box, set a Name for your Lookup.
- Select the Query Box and right Click to get a list of the DejaOffice PC CRM Fields for the Lookup and select the Field you want to Query on.
- Add the SQL lookup command. (See Below for a examples). If you right click in the command box it will list all DPC fields you can use.
- Finally Add the text you are wanting to lookup. (IE: The Last Name, First Name, Phone number, etc that you want to display).
- Click Ok to Save and your filter will be stored for use at any time in the future.
- Example: clxcategory LIKE 'Business' AND addrCity1 LIKE 'Seattle'. This will filter the DPC contacts list to display only contacts with the Category of "Business" and in the City of "Seattle".
- Example: createDate > '1580198400000'. This will filter the DPC contacts list to display only contacts Created after start of 2020. To add a Date to a Query, right click the query box and select "Insert Date Value".
- Example: companyName = 'ACME' AND addrCity1 LIKE 'Atlanta'. This will filter the DPC contacts list to display only contacts in the ACME company in the city of Atlanta.
- Example: phoneValue1 LIKE '%67' OR phoneValue2 LIKE '%67' . This will filter the DPC contacts list to display only contacts where their first two phone number fields end in 67, you can repeat this for all 10 phone fields if you'd like although ensure there is no trailing OR after the last phone value.
- Example: length(companyName)>0. This filter will display all contacts with a Company Name field that is greater than 0. IE Only records with a company name.
- Example: birthday > '19580101' AND birthday < '20100101'. This filter would show contacts with Birthday's between the dates of Jan 1st 1958 and Jan 1st 2010.
- Note: There are many SQL Commands, but for query purposes you should only need AND, =, >, <, %, and LIKE.
Using an Existing Lookup Filter
After creating Lookup Filters, to enable or disable them:
- Open DejaOffice PC CRM and select Contacts.
- Select the Category Filter Icon (or use the 3 bars in the top right and select Category Filter).
- In the bottom left, select the "Queries" option, this will open the Query Filter Menu.
From this menu you an enable or disable any created filers. To clear a lookup filter, select the Category Filter Icon at the top and uncheck any selected Filters. To return to Category Filters, select "Categories" in the bottom left of the Filter Menu.
- Note: Currently you can only Filter on a Lookup Query OR on a Category, not both at the same time.
DejaOffice PC Field Names
If you open a new Query filter you can right click the Query box and select any field to add to the Query.
- Note: this list is not complete and may or may not be up to date, for best results open your Database file in something like SQLite Browser
- In addition not all internal fields are exposed in the display
Contacts
- autoid INTEGER "autoid" INTEGER NOT NULL
- anniversary TEXT "anniversary" TEXT DEFAULT
- birthday TEXT "birthday" TEXT DEFAULT
- children TEXT "children" TEXT DEFAULT
- companyName TEXT "companyName" TEXT DEFAULT
- displayText TEXT "displayText" TEXT DEFAULT
- externalId TEXT "externalId" TEXT
- extraDetails TEXT "extraDetails" TEXT DEFAULT
- firstName TEXT "firstName" TEXT DEFAULT
- id TEXT "id" TEXT
- imAvatarLoc TEXT "imAvatarLoc" TEXT DEFAULT
- jobTitle TEXT "jobTitle" TEXT DEFAULT
- lastName TEXT "lastName" TEXT DEFAULT
- middleName TEXT "middleName" TEXT DEFAULT
- nickname TEXT "nickname" TEXT DEFAULT
- notes TEXT "notes" TEXT DEFAULT
- prefix TEXT "prefix" TEXT DEFAULT
- spouse TEXT "spouse" TEXT DEFAULT
- suffix TEXT "suffix" TEXT DEFAULT
- url TEXT "url" TEXT DEFAULT
- clxcategory TEXT "clxcategory" TEXT DEFAULT
- modifiedPC INTEGER "modifiedPC" INTEGER DEFAULT 0
- modifiedHH INTEGER "modifiedHH" INTEGER DEFAULT 0
- clxdeleted INTEGER "clxdeleted" INTEGER DEFAULT 0
- addrCity1 TEXT "addrCity1" TEXT DEFAULT
- addrCountry1 TEXT "addrCountry1" TEXT DEFAULT
- addrCustomLabel1 TEXT "addrCustomLabel1" TEXT
- addrFreeformAddress1 TEXT "addrFreeformAddress1" TEXT DEFAULT
- addrLabel1 INTEGER "addrLabel1" INTEGER DEFAULT 0
- addrState1 TEXT "addrState1" TEXT DEFAULT
- addrStreetAddress1 TEXT "addrStreetAddress1" TEXT DEFAULT
- addrZipCode1 TEXT "addrZipCode1" TEXT DEFAULT
- addrCity2 TEXT "addrCity2" TEXT DEFAULT
- addrCountry2 TEXT "addrCountry2" TEXT DEFAULT
- addrCustomLabel2 TEXT "addrCustomLabel2" TEXT
- addrFreeformAddress2 TEXT "addrFreeformAddress2" TEXT DEFAULT
- addrLabel2 INTEGER "addrLabel2" INTEGER DEFAULT 0
- addrState2 TEXT "addrState2" TEXT DEFAULT
- addrStreetAddress2 TEXT "addrStreetAddress2" TEXT DEFAULT
- addrZipCode2 TEXT "addrZipCode2" TEXT DEFAULT
- addrCity3 TEXT "addrCity3" TEXT DEFAULT
- addrCountry3 TEXT "addrCountry3" TEXT DEFAULT
- addrCustomLabel3 TEXT "addrCustomLabel3" TEXT
- addrFreeformAddress3 TEXT "addrFreeformAddress3" TEXT DEFAULT
- addrLabel3 INTEGER "addrLabel3" INTEGER DEFAULT 0
- addrState3 TEXT "addrState3" TEXT DEFAULT
- addrStreetAddress3 TEXT "addrStreetAddress3" TEXT DEFAULT
- addrZipCode3 TEXT "addrZipCode3" TEXT DEFAULT
- customName1 TEXT "customName1" TEXT DEFAULT
- customValue1 TEXT "customValue1" TEXT DEFAULT
- customName2 TEXT "customName2" TEXT DEFAULT
- customValue2 TEXT "customValue2" TEXT DEFAULT
- customName3 TEXT "customName3" TEXT DEFAULT
- customValue3 TEXT "customValue3" TEXT DEFAULT
- customName4 TEXT "customName4" TEXT DEFAULT
- customValue4 TEXT "customValue4" TEXT DEFAULT
- customName5 TEXT "customName5" TEXT DEFAULT
- customValue5 TEXT "customValue5" TEXT DEFAULT
- customName6 TEXT "customName6" TEXT DEFAULT
- customValue6 TEXT "customValue6" TEXT DEFAULT
- customName7 TEXT "customName7" TEXT DEFAULT
- customValue7 TEXT "customValue7" TEXT DEFAULT
- customName8 TEXT "customName8" TEXT DEFAULT
- customValue8 TEXT "customValue8" TEXT DEFAULT
- customName9 TEXT "customName9" TEXT DEFAULT
- customValue9 TEXT "customValue9" TEXT DEFAULT
- emailCustomLabel1 TEXT "emailCustomLabel1" TEXT DEFAULT
- emailLabel1 INTEGER "emailLabel1" INTEGER DEFAULT 0
- emailValue1 TEXT "emailValue1" TEXT DEFAULT
- emailCustomLabel2 TEXT "emailCustomLabel2" TEXT DEFAULT
- emailLabel2 INTEGER "emailLabel2" INTEGER DEFAULT 0
- emailValue2 TEXT "emailValue2" TEXT DEFAULT
- emailCustomLabel3 TEXT "emailCustomLabel3" TEXT DEFAULT
- emailLabel3 INTEGER "emailLabel3" INTEGER DEFAULT 0
- emailValue3 TEXT "emailValue3" TEXT DEFAULT
- imCustomLabel1 TEXT "imCustomLabel1" TEXT DEFAULT
- imLabel1 INTEGER "imLabel1" INTEGER DEFAULT 0
- imServiceProtocol1 INTEGER "imServiceProtocol1" INTEGER DEFAULT 0
- imValue1 TEXT "imValue1" TEXT DEFAULT
- imCustomLabel2 TEXT "imCustomLabel2" TEXT DEFAULT
- imLabel2 INTEGER "imLabel2" INTEGER DEFAULT 0
- imServiceProtocol2 INTEGER "imServiceProtocol2" INTEGER DEFAULT 0
- imValue2 TEXT "imValue2" TEXT DEFAULT
- imCustomLabel3 TEXT "imCustomLabel3" TEXT DEFAULT
- imLabel3 INTEGER "imLabel3" INTEGER DEFAULT 0
- imServiceProtocol3 INTEGER "imServiceProtocol3" INTEGER DEFAULT 0
- imValue3 TEXT "imValue3" TEXT DEFAULT
- phoneCustomLabel1 TEXT "phoneCustomLabel1" TEXT DEFAULT
- phoneLabel1 INTEGER "phoneLabel1" INTEGER DEFAULT 0
- phoneValue1 TEXT "phoneValue1" TEXT DEFAULT
- phoneCustomLabel2 TEXT "phoneCustomLabel2" TEXT DEFAULT
- phoneLabel2 INTEGER "phoneLabel2" INTEGER DEFAULT 0
- phoneValue2 TEXT "phoneValue2" TEXT DEFAULT
- phoneCustomLabel3 TEXT "phoneCustomLabel3" TEXT DEFAULT
- phoneLabel3 INTEGER "phoneLabel3" INTEGER DEFAULT 0
- phoneValue3 TEXT "phoneValue3" TEXT DEFAULT
- phoneCustomLabel4 TEXT "phoneCustomLabel4" TEXT DEFAULT
- phoneLabel4 INTEGER "phoneLabel4" INTEGER DEFAULT 0
- phoneValue4 TEXT "phoneValue4" TEXT DEFAULT
- phoneCustomLabel5 TEXT "phoneCustomLabel5" TEXT DEFAULT
- phoneLabel5 INTEGER "phoneLabel5" INTEGER DEFAULT 0
- phoneValue5 TEXT "phoneValue5" TEXT DEFAULT
- phoneCustomLabel6 TEXT "phoneCustomLabel6" TEXT DEFAULT
- phoneLabel6 INTEGER "phoneLabel6" INTEGER DEFAULT 0
- phoneValue6 TEXT "phoneValue6" TEXT DEFAULT
- phoneCustomLabel7 TEXT "phoneCustomLabel7" TEXT DEFAULT
- phoneLabel7 INTEGER "phoneLabel7" INTEGER DEFAULT 0
- phoneValue7 TEXT "phoneValue7" TEXT DEFAULT
- phoneCustomLabel8 TEXT "phoneCustomLabel8" TEXT DEFAULT
- phoneLabel8 INTEGER "phoneLabel8" INTEGER DEFAULT 0
- phoneValue8 TEXT "phoneValue8" TEXT DEFAULT
- phoneCustomLabel9 TEXT "phoneCustomLabel9" TEXT DEFAULT
- phoneLabel9 INTEGER "phoneLabel9" INTEGER DEFAULT 0
- phoneValue9 TEXT "phoneValue9" TEXT DEFAULT
- phoneCustomLabel10 TEXT "phoneCustomLabel10" TEXT DEFAULT
- phoneLabel10 INTEGER "phoneLabel10" INTEGER DEFAULT 0
- phoneValue10 TEXT "phoneValue10" TEXT DEFAULT
- urlLabel1 TEXT "urlLabel1" TEXT DEFAULT
- urlURL1 TEXT "urlURL1" TEXT DEFAULT
- urlLabel2 TEXT "urlLabel2" TEXT DEFAULT
- urlURL2 TEXT "urlURL2" TEXT DEFAULT
- urlLabel3 TEXT "urlLabel3" TEXT DEFAULT
- urlURL3 TEXT "urlURL3" TEXT DEFAULT
- pictureLocSquare BLOB "pictureLocSquare" BLOB
- recordType INTEGER "recordType" INTEGER DEFAULT 1
- pictureFile TEXT "pictureFile" TEXT
- phoneQuickdial1 TEXT "phoneQuickdial1" TEXT
- phoneQuickdial2 TEXT "phoneQuickdial2" TEXT
- phoneQuickdial3 TEXT "phoneQuickdial3" TEXT
- phoneQuickdial4 TEXT "phoneQuickdial4" TEXT
- phoneQuickdial5 TEXT "phoneQuickdial5" TEXT
- phoneQuickdial6 TEXT "phoneQuickdial6" TEXT
- phoneQuickdial7 TEXT "phoneQuickdial7" TEXT
- phoneQuickdial8 TEXT "phoneQuickdial8" TEXT
- phoneQuickdial9 TEXT "phoneQuickdial9" TEXT
- phoneQuickdial10 TEXT "phoneQuickdial10" TEXT
- pictureFileSquare TEXT "pictureFileSquare" TEXT
- version INTEGER "version" INTEGER DEFAULT 0
- urlLabelValue1 TEXT "urlLabelValue1" TEXT DEFAULT
- urlLabelValue2 TEXT "urlLabelValue2" TEXT DEFAULT
- urlLabelValue3 TEXT "urlLabelValue3" TEXT DEFAULT
- fullName TEXT "fullName" TEXT DEFAULT
- multiCategory TEXT "multiCategory" TEXT DEFAULT
- private INTEGER "private" INTEGER DEFAULT 0
- wirelessID TEXT "wirelessID" TEXT DEFAULT
- ringtoneID INTEGER "ringtoneID" INTEGER DEFAULT 0
- modifiedForAndroid INTEGER "modifiedForAndroid" INTEGER DEFAULT 0
- androidAccountName TEXT "androidAccountName" TEXT DEFAULT
- androidAccountType TEXT "androidAccountType" TEXT DEFAULT
- multiContactIds TEXT "multiContactIds" TEXT DEFAULT
- multiContactNames TEXT "multiContactNames" TEXT DEFAULT
- hasNote INTEGER "hasNote" INTEGER DEFAULT 0
- hasHistory INTEGER "hasHistory" INTEGER DEFAULT 0
- department TEXT "department" TEXT DEFAULT
- addrLong1 REAL "addrLong1" REAL DEFAULT 0
- addrLat1 REAL "addrLat1" REAL DEFAULT 0
- addrLong2 REAL "addrLong2" REAL DEFAULT 0
- addrLat2 REAL "addrLat2" REAL DEFAULT 0
- addrLong3 REAL "addrLong3" REAL DEFAULT 0
- addrLat3 REAL "addrLat3" REAL DEFAULT 0
- phoneDisplay TEXT "phoneDisplay" TEXT DEFAULT
- addrMapType1 INTEGER "addrMapType1" INTEGER DEFAULT 0
- addrMapType2 INTEGER "addrMapType2" INTEGER DEFAULT 0
- addrMapType3 INTEGER "addrMapType3" INTEGER DEFAULT 0
- addrMapFile1 TEXT "addrMapFile1" TEXT DEFAULT
- addrMapFile2 TEXT "addrMapFile2" TEXT DEFAULT
- addrMapFile3 TEXT "addrMapFile3" TEXT DEFAULT
- addrMapFileOther1 TEXT "addrMapFileOther1" TEXT DEFAULT
- addrMapFileOther2 TEXT "addrMapFileOther2" TEXT DEFAULT
- addrMapFileOther3 TEXT "addrMapFileOther3" TEXT DEFAULT
- hasAttachment INTEGER "hasAttachment" INTEGER DEFAULT 0
- nextActionTextA TEXT "nextActionTextA" TEXT DEFAULT
- nextActionTextD TEXT "nextActionTextD" TEXT DEFAULT
- nextActionTextT TEXT "nextActionTextT" TEXT DEFAULT
- nextActionIDA INTEGER "nextActionIDA" INTEGER DEFAULT 0
- nextActionIDD INTEGER "nextActionIDD" INTEGER DEFAULT 0
- nextActionIDT INTEGER "nextActionIDT" INTEGER DEFAULT 0
- nextActionTimeA INTEGER "nextActionTimeA" INTEGER DEFAULT 0
- nextActionTimeD INTEGER "nextActionTimeD" INTEGER DEFAULT 0
- nextActionTimeT INTEGER "nextActionTimeT" INTEGER DEFAULT 0
- searchName TEXT "searchName" TEXT DEFAULT
- searchCompany TEXT "searchCompany" TEXT DEFAULT
- multiContactEmails TEXT "multiContactEmails" TEXT DEFAULT
- createDate INTEGER "createDate" INTEGER DEFAULT 0
- assistantName TEXT "assistantName" TEXT DEFAULT
- hoursJSON TEXT "hoursJSON" TEXT DEFAULT
- timezone TEXT "timezone" TEXT DEFAULT
- userID INTEGER "userID" INTEGER DEFAULT 0
- customName10 TEXT "customName10" TEXT DEFAULT
- customValue10 TEXT "customValue10" TEXT DEFAULT
- customName11 TEXT "customName11" TEXT DEFAULT
- customValue11 TEXT "customValue11" TEXT DEFAULT
- customName12 TEXT "customName12" TEXT DEFAULT
- customValue12 TEXT "customValue12" TEXT DEFAULT
- customName13 TEXT "customName13" TEXT DEFAULT
- customValue13 TEXT "customValue13" TEXT DEFAULT
- customName14 TEXT "customName14" TEXT DEFAULT
- customValue14 TEXT "customValue14" TEXT DEFAULT
- customName15 TEXT "customName15" TEXT DEFAULT
- customValue15 TEXT "customValue15" TEXT DEFAULT
- customName16 TEXT "customName16" TEXT DEFAULT
- customValue16 TEXT "customValue16" TEXT DEFAULT
- customName17 TEXT "customName17" TEXT DEFAULT
- customValue17 TEXT "customValue17" TEXT DEFAULT
- customName18 TEXT "customName18" TEXT DEFAULT
- customValue18 TEXT "customValue18" TEXT DEFAULT
- customName19 TEXT "customName19" TEXT DEFAULT
- customValue19 TEXT "customValue19" TEXT DEFAULT
- customName20 TEXT "customName20" TEXT DEFAULT
- customValue20 TEXT "customValue20" TEXT DEFAULT
- multiUserID TEXT "multiUserID" TEXT DEFAULT
Tasks
- autoid INTEGER "autoid" INTEGER NOT NULL
- id TEXT "id" TEXT
- alarmDateTime INTEGER "alarmDateTime" INTEGER DEFAULT 0
- completed INTEGER "completed" INTEGER DEFAULT 0
- externalId TEXT "externalId" TEXT
- location TEXT "location" TEXT DEFAULT
- note TEXT "note" TEXT DEFAULT
- originalStartTimestamp INTEGER "originalStartTimestamp" INTEGER DEFAULT 0
- priority INTEGER "priority" INTEGER DEFAULT 2
- subject TEXT "subject" TEXT DEFAULT
- startTimestamp INTEGER "startTimestamp" INTEGER DEFAULT 0
- clxcategory TEXT "clxcategory" TEXT DEFAULT
- modifiedPC INTEGER "modifiedPC" INTEGER DEFAULT 0
- modifiedHH INTEGER "modifiedHH" INTEGER DEFAULT 0
- clxdeleted INTEGER "clxdeleted" INTEGER DEFAULT 0
- recordType INTEGER "recordType" INTEGER DEFAULT 3
- multiCategory TEXT "multiCategory" TEXT DEFAULT
- status TEXT "status" TEXT DEFAULT
- percentComplete INTEGER "percentComplete" INTEGER DEFAULT 0
- priorityString TEXT "priorityString" TEXT DEFAULT
- startDate2 INTEGER "startDate2" INTEGER DEFAULT 0
- private INTEGER "private" INTEGER DEFAULT 0
- multiContactIds TEXT "multiContactIds" TEXT DEFAULT
- multiContactNames TEXT "multiContactNames" TEXT DEFAULT
- wirelessID TEXT "wirelessID" TEXT DEFAULT
- project TEXT "project" TEXT DEFAULT
- rrule TEXT "rrule" TEXT
- recurrenceStartDate INTEGER "recurrenceStartDate" INTEGER DEFAULT 0
- parentId TEXT "parentId" TEXT
- lastSnooze INTEGER "lastSnooze" INTEGER DEFAULT 0
- originalAlarm INTEGER "originalAlarm" INTEGER DEFAULT 0
- firstInstanceDate INTEGER "firstInstanceDate" INTEGER DEFAULT 0
- lastInstanceDate INTEGER "lastInstanceDate" INTEGER DEFAULT 0
- locLong REAL "locLong" REAL DEFAULT 0
- locLat REAL "locLat" REAL DEFAULT 0
- alarmTone TEXT "alarmTone" TEXT DEFAULT
- locName TEXT "locName" TEXT DEFAULT
- locCompany TEXT "locCompany" TEXT DEFAULT
- locStreet TEXT "locStreet" TEXT DEFAULT
- locCity TEXT "locCity" TEXT DEFAULT
- locState TEXT "locState" TEXT DEFAULT
- locZip TEXT "locZip" TEXT DEFAULT
- locCountry TEXT "locCountry" TEXT DEFAULT
- locMapType INTEGER "locMapType" INTEGER DEFAULT 0
- locMapFile TEXT "locMapFile" TEXT DEFAULT
- locMapFileOther TEXT "locMapFileOther" TEXT DEFAULT
- hasAttachment INTEGER "hasAttachment" INTEGER DEFAULT 0
- completedDate INTEGER "completedDate" INTEGER DEFAULT 0
- specialType INTEGER "specialType" INTEGER DEFAULT 0
- createDate INTEGER "createDate" INTEGER DEFAULT 0
- activityType TEXT "activityType" TEXT DEFAULT
- activityTypeID INTEGER "activityTypeID" INTEGER DEFAULT 0
- userID INTEGER "userID" INTEGER DEFAULT 0
- notify INTEGER "notify" INTEGER DEFAULT 0
- multiUserID TEXT "multiUserID" TEXT DEFAULT '