Addressbook.multivalue.valueAtIndex
-----------------------------------

Returns the value for the given index.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Addressbook](component_Addressbook.md) | [3.1](newinversion31.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

### Deprecated

This function was [deprecated](deprecated.md). Use [Contacts](component_Contacts.md) functions instead.

MBS( "Addressbook.multivalue.valueAtIndex"; Index ) 

**MBS**( **"Addressbook.multivalue.valueAtIndex";** /\* Returns the value for the given index. \*/  
**$Index**) /\* The index for the value to be returned. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Index | The index for the value to be returned. |  |

### Result

Returns value or error.

### Description

Returns the value for the given index.  
If the index argument is out of bounds, this method returns an error.  
### Examples

Queries first email of me:

 $personID = MBS ( "[Addressbook.me](Addressbookme.md)" )  
$r = MBS ( "[Addressbook.record.valueForProperty](AddressbookrecordvalueForProperty.md)"; $personID ; "EmailProperty" )  
$count = MBS ( "[Addressbook.multivalue.count](Addressbookmultivaluecount.md)")  
$email = MBS ( "Addressbook.multivalue.valueAtIndex"; 0)  
Query all my URLs:

 Set Variable \[$personID ; Value:MBS ( "[Addressbook.me](Addressbookme.md)")\]  
Set Variable \[$Urls ; Value:MBS ( "[Addressbook.record.valueForProperty](AddressbookrecordvalueForProperty.md)"; $personID ; "URLsProperty")\]  
Set Variable \[$count ; Value:MBS ( "[Addressbook.multivalue.count](Addressbookmultivaluecount.md)")\]  
If \[$count &gt; 0\]  
 #for loop  
 Set Variable \[$index ; Value:0\]  
 Loop  
 Set Variable \[$value ; Value:MBS ( "Addressbook.multivalue.valueAtIndex"; $index )\]  
 Show Custom Dialog \["URL"; $value \]  
 #next  
 Set Variable \[$index ; Value:$index + 1\]  
 Exit Loop If \[$index = $count \]  
 End Loop  
End If  
### See also

- [Addressbook.me](Addressbookme.md)
- [Addressbook.multivalue.identifierAtIndex](AddressbookmultivalueidentifierAtIndex.md)
- [Addressbook.multivalue.insertValue](AddressbookmultivalueinsertValue.md)
- [Addressbook.multivalue.labelAtIndex](AddressbookmultivaluelabelAtIndex.md)
- [Addressbook.multivalue.replaceLabelAtIndex](AddressbookmultivaluereplaceLabelAtIndex.md)
- [Addressbook.multivalue.replaceValueAtIndex](AddressbookmultivaluereplaceValueAtIndex.md)
- [Addressbook.multivalue.valueForIdentifier](AddressbookmultivaluevalueForIdentifier.md)
- [Addressbook.multivalue.valueForLabel](AddressbookmultivaluevalueForLabel.md)
- [Addressbook.multivalue.values](Addressbookmultivaluevalues.md)
- [Addressbook.record.SetValueForProperty](AddressbookrecordSetValueForProperty.md)

### Example Databases

- [Mac and iOS/Addressbook/Addressbook](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Addressbook/Addressbook.shtml#1ScriptAnchor_)

### Blog Entries

- [Filemaker and the Mac OS X Addressbook](https://www.mbsplugins.de/archive/2013-05-04/Filemaker_and_the_Mac_OS_X_Add/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 26th February 2016

  
[Addressbook.multivalue.setPrimaryIdentifier](AddressbookmultivaluesetPrimaryIdentifier.md) - [Addressbook.multivalue.valueForIdentifier](AddressbookmultivaluevalueForIdentifier.md)

[HTML Version](AddressbookmultivaluevalueAtIndex.shtml)