# selectByMulti

## Description

Retrieves the specified records from multiple fields in a dataset.

## Input / Parameter

| Name     | Description                                             | Input Type  | Default | Options | Required |
| -------- | ------------------------------------------------------- | ----------- | ------- | ------- | -------- |
| dataset  | The name of the local table to select the records from. | String/Text | -       | -       | Yes      |
| first    |                                                         | String/Text | -       | -       | No       |
| filter   | The filters for the field and value to select.          | Array/List  | -       | -       | Yes      |
| orFilter | Additional filters for the field and value to select.   | Array/List  | -       | -       | No       |
| extra    | Extra parameters stored and passed to callback.         | Any         | -       | -       | No       |

## Output

| Description                                                | Output Type |
| ---------------------------------------------------------- | ----------- |
| Returns the list of records selected from the local table. | Array/List  |

## Callback?

### callback

The function to be executed if the specified records are selected successfully.

### errorCallback

The function to be executed if the specified records are not selected successfully.

## Video

Coming Soon.

## Example

### Steps

1. Drag the `selectByMulti` function into the event flow.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-54e880a1541c01e31b405256ead6589a2156c832%2FselectByMulti-step-1.png?alt=media)
2. Specify the "dataset" to select from, which in our example will be "l\_data".

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-74d79c1a6480b3ebb387954d7d7fcbb983ac8da8%2FselectByMulti-step-2.png?alt=media)
3. Under the "filter" field, use `toArray` then `toObject` to specify the fields to filter on.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-32d8e82383a2bf6c97b704d6fa5f084c4ec7f125%2FselectByMulti-step-3.png?alt=media)

### Result

Returns the record where \_id=3 and name=John

![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-286e78dc3eb2a14171e6da4f9a0b1a79d0775117%2FselectByMulti-result-1.png?alt=media)

## Links
