Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

Addressbook.multivalue.addValue

Adds a value and its label to a multivalue list.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Addressbook 3.1 Yes No Yes, macOS only No Yes

MBS( "Addressbook.multivalue.addValue"; value; label )

Parameters

Parameter Description Example value
value The value to add. "test@test.test"
label The label to associate with the value. "Work"

Result

Returns identifier or error.

Description

Adds a value and its label to a multivalue list.
Returns the new identifier if value is added successfully; otherwise, nil.

Possible labels are:
kABHomePageLabel, kABEmailWorkLabel, kABEmailHomeLabel, kABAddressHomeLabel, kABAddressWorkLabel, kABAnniversaryLabel, kABFatherLabel, kABMotherLabel, kABParentLabel, kABBrotherLabel, kABSisterLabel, kABChildLabel, kABFriendLabel, kABSpouseLabel, kABPartnerLabel, kABAssistantLabel, kABManagerLabel, kABPhoneWorkLabel, kABPhoneHomeLabel, kABPhoneiPhoneLabel, kABPhoneMobileLabel, kABPhoneMainLabel, kABPhoneHomeFAXLabel, kABPhoneWorkFAXLabel, kABPhonePagerLabel, kABAIMWorkLabel, kABAIMHomeLabel, kABJabberWorkLabel, kABJabberHomeLabel, kABMSNWorkLabel, kABMSNHomeLabel, kABYahooWorkLabel, kABYahooHomeLabel, kABICQWorkLabel, kABICQHomeLabel, kABWorkLabel, kABHomeLabel, kABOtherLabel or kABMobileMeLabel.

Examples

Add a new URL to a contact:

Set Variable [$r; MBS( "Addressbook.multivalue.New") ]
Set Variable [$ID; MBS( "Addressbook.multivalue.addValue"; "http://www.mbsplugins.de"; "WorkLabel" ) ]
Set Variable [$r; MBS( "Addressbook.multivalue.setPrimaryIdentifier"; $ID ) ]
Set Variabel [$r; MBS( "Addressbook.record.SetValueForProperty"; $personID; "URLsProperty"; "multivalue" ) ]

Add work and home emails:

$r = MBS( "Addressbook.multivalue.New" )
$WorkEmailID = MBS( "Addressbook.multivalue.addValue"; Addressbook::WorkEmail; "EmailWorkLabel" )
$HomeEmailID = MBS( "Addressbook.multivalue.addValue"; Addressbook::HomeEmail; "EmailHomeLabel" )
$r = MBS( "Addressbook.multivalue.setPrimaryIdentifier"; $WorkEmailID )
$r = MBS( "Addressbook.record.SetValueForProperty"; $personID; "EmailProperty"; "multivalue" )

Add an address:

# Add one address
Set Variable [$result; Value:MBS ( "Addressbook.multivalue.New"; 1 )
Set Variable [$id; Value:MBS ( "Addressbook.multivalue.addAddress"; $str; $plz; $ort; $land; ""; "" )]
Set Variable [$result; Value:MBS ( "Addressbook.multivalue.setPrimaryIdentifier"; $id )]
Set Variable [$result; Value:MBS ( "Addressbook.record.SetValueForProperty"; $personID; "AddressProperty"; "multivalue" )]

Add an email:

Set Variable [$result; Value:MBS ( "Addressbook.multivalue.New")
Set Variable [$id; Value:MBS ( "Addressbook.multivalue.addValue"; $email; "EmailWorkLabel" )]
Set Variable [$result; Value:MBS ( "Addressbook.multivalue.setPrimaryIdentifier"; $id )]
Set Variable [$result; Value:MBS ( "Addressbook.record.SetValueForProperty"; $personID; "EmailProperty"; "multivalue" )]

Add phone numbers:

Set Variable [$result; Value:MBS ( "Addressbook.multivalue.New"]
Set Variable [$tel_id; Value:MBS ( "Addressbook.multivalue.addValue"; $tel; "PhoneWorkLabel" )]
Set Variable [$mob_id; Value:MBS ( "Addressbook.multivalue.addValue"; $mob; "PhoneMobileLabel" )]
Set Variable [$result; Value:MBS ( "Addressbook.multivalue.setPrimaryIdentifier"; $mob_id )]
Set Variable [$result; Value:MBS ( "Addressbook.record.SetValueForProperty"; $personID; "PhoneProperty"; "multivalue" )]

See also

Example Databases


Addressbook.multivalue.addAddress   -   Addressbook.multivalue.count

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins