---
title: "BA_getSingleValue"
canonical: "https://support.appfire.com/space/PSJ/15485150/BA_getSingleValue"
format: markdown
---
> Macro (aura-html)


> 📝 The use of this function requires the Power Actions add-on be installed and licensed.

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | BA_getSingleValue(argv, label) | **Package** | poweraction |
| **Alias** |  | **Pkg Usage** | getSingleValue(argv, label) |

## Description

> Macro (excerpt)
> 
> Gets the value entered or the selected option for the given field label.

Gets the value entered or the selected option for the given field label.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| argv | String [] | Yes | The argv variable (predefined variable). |
| label | String | Yes | The label of the text/text area/select list/radio group field. |

## Return Type

**String**

For a checkbox it will return "checked" if the checkbox was selected or an empty string if not.

## Example

For any field that may contain only a single string type value we may use the BA_getSingleValue function. For the following script

```
BA_createInput("Enter keyword", "demo", false);
```

We may obtain the field's value as in the next code sample:

```
string res = BA_getSingleValue(argv, "Enter keyword");
//res = demo
```

## See also

> Macro (contentbylabel)