DynaPDF.GetFieldChoiceValue
---------------------------

Retrieves a choice value of a combo or list box.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [4.0](newinversion40.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.GetFieldChoiceValue"; PDF; Field; ValIndex; Selector ) 

**MBS**( **"DynaPDF.GetFieldChoiceValue";** /\* Retrieves a choice value of a combo or list box. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Field**; /\* The field index or field name.e.g. "FirstName" \*/   
**$ValIndex**; /\* The value index.e.g. 0 \*/   
**$Selector**) /\* Which value to return. Can be ExpValue, ExpValueLen, Value, ValueLen or Selected.e.g. "Value" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Field | The field index or field name. | "FirstName" |
| ValIndex | The value index. | 0 |
| Selector | Which value to return. Can be ExpValue, ExpValueLen, Value, ValueLen or Selected. | "Value" |

### Result

Returns value or error.

### Description

Retrieves a choice value of a combo or list box.   
The parameter Field must be a valid handle of a combo or list box. ValIndex is the array index of the choice value to be retrieved. Call [DynaPDF.GetFieldExpValCount](DynaPDFGetFieldExpValCount.md) to determine how many choice values are available in the combo or list box.  
Choice values can be inherited from a parent group field. This is the case if the field is part of a field group. See "Interactive Forms/What is a Field Group?" Section in DynaPDF help file for further information.  
See also [GetFieldChoiceValue](https://www.monkeybreadsoftware.com/DynaPDF-Manual/GetFieldChoiceValue.shtml) function in DynaPDF manual.

### See also

- [DynaPDF.GetField](DynaPDFGetField.md)
- [DynaPDF.GetFieldExpValCount](DynaPDFGetFieldExpValCount.md)
- [DynaPDF.GetFieldExpValue](DynaPDFGetFieldExpValue.md)
- [DynaPDF.GetFieldExpValueEx](DynaPDFGetFieldExpValueEx.md)
- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetFieldExpValue](DynaPDFSetFieldExpValue.md)
- [DynaPDF.SetFillColorValue](DynaPDFSetFillColorValue.md)

This function checks for a license.

Created 18th August 2014 , last changed 27th May 2017

  
[DynaPDF.GetFieldBorderWidth](DynaPDFGetFieldBorderWidth.md) - [DynaPDF.GetFieldColor](DynaPDFGetFieldColor.md)

[HTML Version](DynaPDFGetFieldChoiceValue.shtml)