> For the complete documentation index, see [llms.txt](https://docs.emobiq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/app/setcombooptions.md).

# setComboOptions

## Description

Allows users to set the values or options for a combo box component.

## Input / Parameter

| Name             | Description                                 | Input Type  | Default | Options | Required                       |
| ---------------- | ------------------------------------------- | ----------- | ------- | ------- | ------------------------------ |
| combo            | The name of the combo box component.        | String/Text | -       | -       | Partial (Yes if no 'comboId'.) |
| comboId          | The id of the combo box component.          | String/Text | -       | -       | Partial (Yes if no 'combo'.)   |
| data             | The list of options.                        | Array/List  | -       | -       | Yes                            |
| valueField       | The attribute name of the value inputs.     | String/Text | -       | -       | Yes                            |
| valueSeparator   | The separator used to separate the value.   | String/Text | -       | -       | No                             |
| displayField     | The attribute name of the dropdown values.  | String/Text | -       | -       | Yes                            |
| displaySeparator | The separator used to separate the display. | String/Text | -       | -       | No                             |

**\* Note:** Either combo or comboId must have value in order for this function to work.

## Output

N/A

Note: The component will be updated to show the combo box options.

## Callback

N/A

## Video

Coming Soon.

## Example

The user want to make a not visible component to visible.

### Step

1. Draw a combo box "ComboBox617", a button "setComboOptions".

   ![](/files/LKyFEthCxum4hMQV2OGK)
2. Call the function

   ![](/files/4fVzwPCDF7RQ01aVQnjc)
3. Populate an array into data parameter by adding "toArray" & "toObject" functions.

   ![](/files/dqS2wuC9V5irdqb9YuJr)
4. Define the value field & display field.

   ![](/files/NtYrynW1C85XG5zS4mBz)

### Result

The combo box "ComboBox617" have the display values of "abc" & "dfe" & the value of "abc is 1, value of "dfe" is 2.

![](/files/nSf1oRtyzfgrTUPAzmqi)

## Links


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/app/setcombooptions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
