The use of this routine requires the Power Actions add-on be installed and licensed.
Table plus |
---|
applyColStyleToCell | true |
---|
heading | 0 |
---|
columnTypes | s,s,s,s |
---|
multiple | false |
---|
columnAttributes | style="background:#e5e7ea;font-weight:bold,,style="background:#e5e7ea;font-weight:bold, |
---|
enableSorting | false |
---|
|
Syntax | BA_getMultiValues(argv, label) | Package | poweraction | Alias | | Pkg Usage | getMultiValues(argv, label) | |
Description
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
Table plus |
---|
applyColStyleToCell | true |
---|
columnTypes | s,s,s,s |
---|
heading | 0 |
---|
multiple | false |
---|
enableSorting | false |
---|
|
Parameter name | Type | Required | Description |
---|
argv | String [] | Yes | The argv variable (predefined variable). | label | String | Yes | The label of the multi select list/checkbox group/file upload field. | |
Return Type
String []
String array representing the selected options.
Examples
Example 1
For a script that creates a multi select list like the following:
Code Block |
---|
BA_createMultiSelectList("Multiselect", {"a", "b", "c", "d", "e"}, {"a", "c", "e"}, false, true, "This field is required"); |
The selected values may be obtained with the BA_getMultiValues routine:
Code Block |
---|
string [] res = BA_getMultiValues(argv, "Multiselect");
//res[0] = a
//res[1] = c
//res[2] = e
//The routine has returned in this case an array of three strings, "a", "c" and "e". |
Example 2
Using a file upload field.
Code Block |
---|
BA_createFileUpload("File 1", false, true, "Description for file 1"); |
We may obtain the uploads field's value as in the next code sample:
Code Block |
---|
string [] res = BA_getSingleValue(argv, "File 1");
//res = "Demo_File.txt|C:\Program Files\Atlassian\Application Data\Jira\kepler\blitz-upload\Demo_File.txt" |
Note |
---|
With a file upload field the routine will return a string array containing pairs of original filename and uploaded path. Even indices will contain original filenames, while odd indices will contain an uploaded path. |
See also
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 25 |
---|
showSpace | false |
---|
cql | label = "pa_routine" and space = currentSpace ( ) |
---|
labels | array_routines |
---|
|