Skip to content
miyako edited this page Jan 11, 2013 · 4 revisions

two new commands for security/privacy database in 10.8

  //reset the privacy database for AddressBook
AB REMOVE FROM PRIVACY LIST 

  //1 if 4D access to the contacts database is denied
$denied:=AB Is access denied 
  `search single criterium

ARRAY TEXT($personIds;0)

C_TEXT($property;$label;$key;$value;$condition)

$property:=AB FirstName 
$value:="h"
$condition:=AB ContainsSubString 

AB QUERY PEOPLE ($property;$label;$key;$value;$condition;$personIds)
  `every person whose first name contains 'h'

$property:=AB Email 
$label:=AB WorkLabel 
$value:="4d"
$condition:=AB ContainsSubString 

AB QUERY PEOPLE ($property;$label;$key;$value;$condition;$personIds)
  `every person whose work email name contains '4d'

$property:=AB Address 
$label:=AB HomeLabel 
$key:=AB ZIP 
$value:="12345"
$condition:=AB Equal 

AB QUERY PEOPLE ($property;$label;$key;$value;$condition;$personIds)
  `every person whose home zip code equals  '12345'

  `NEW!! search multiple criteria

ARRAY TEXT($properties;2)
ARRAY TEXT($labels;2)
ARRAY TEXT($keys;2)
ARRAY TEXT($values;2)
ARRAY TEXT($conditions;2)

$properties{1}:=AB FirstName 
$properties{2}:=AB LastName 

$values{1}:="john"
$values{2}:="smith"

$conditions{1}:=AB Equal
$conditions{2}:=AB Equal 

AB FIND PEOPLE ($properties;$labels;$keys;$values;$conditions;AB And ;$personIds)
  `every person whose first name equals 'john' and last name equals 'smith'
Clone this wiki locally