Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.2   7.3   7.4   7.5   8.0   8.1   8.2   8.3   8.4   8.5    Statistic  

Addressbook.multivalue.setPrimaryIdentifier

Sets the primary value to be the value for the given identifier.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Addressbook 3.1 Yes No No No No
MBS( "Addressbook.multivalue.setPrimaryIdentifier"; identifier )   More

Parameters

Parameter Description Example value
identifier The identifier whose value will be used as the primary value for a multivalue property. $identifier

Result

Returns OK on success and error on failure.

Description

Sets the primary value to be the value for the given identifier.
If the identifier is empty, this method returns an error. Use the Addressbook.multivalue.identifierAtIndex method to get the identifier given the index.

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" )

See also

Example Databases

Created 18th August 2014, last changed 18th August 2014


Addressbook.multivalue.replaceValueAtIndex   -   Addressbook.multivalue.valueAtIndex

Feedback: Report problem or ask question.




Links
MBS FileMaker tutorial videos