# DEFAULTS

## Overview

The code defines constants and behaviors for handling different states in Servoy's solution model scripting.\
These constants help manage form properties, component behaviors, and navigator settings, enabling efficient\
customization of UI and scripting functionality. The provided structures also ensure compatibility with\
JavaScript and Servoy's development environment.

## Constants Summarized

| Type                                                                | Name                                 | Summary                                                                                          |
| ------------------------------------------------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------------ |
| [JSMethod](/reference/servoycore/dev-api/solutionmodel/jsmethod.md) | [COMMAND\_DEFAULT](#command_default) | Constants used for setting commands to "default".                                                |
| [JSMethod](/reference/servoycore/dev-api/solutionmodel/jsmethod.md) | [COMMAND\_NONE](#command_none)       | Constant used for setting commands to "none".                                                    |
| [String](/reference/servoycore/dev-api/js-lib/string.md)            | [DEFAULT](#default)                  | Constant used in various places to set properties to their default value.                        |
| [String](/reference/servoycore/dev-api/js-lib/string.md)            | [IGNORE](#ignore)                    | Constant used to remove a component from the tab sequence or set form navigator to IGNORE value. |
| [String](/reference/servoycore/dev-api/js-lib/string.md)            | [NONE](#none)                        | Constant used in various places to set properties to "none".                                     |

## Constants Detailed

### COMMAND\_DEFAULT

Constants used for setting commands to "default".

**Type**\
[JSMethod](/reference/servoycore/dev-api/solutionmodel/jsmethod.md)

**Sample**

```js
var form = solutionModel.newForm('parentForm', 'db:/example_data/parent_table', null, false, 1200, 800);
form.onFindCmd = SM_DEFAULTS.COMMAND_DEFAULT; // This makes the find work like it does by default.
```

### COMMAND\_NONE

Constant used for setting commands to "none".

**Type**\
[JSMethod](/reference/servoycore/dev-api/solutionmodel/jsmethod.md)

**Sample**

```js
var form = solutionModel.newForm('parentForm', 'db:/example_data/parent_table', null, false, 1200, 800);
form.onFindCmd = SM_DEFAULTS.COMMAND_NONE; // This disables the find on the form.
```

### DEFAULT

Constant used in various places to set properties to their default value.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var form = solutionModel.newForm('parentForm', 'db:/example_data/parent_table', null, false, 1200, 800);
form.navigator = SM_DEFAULTS.DEFAULT; // Show the default navigator on the form.
```

### IGNORE

Constant used to remove a component from the tab sequence or set form navigator to IGNORE value.

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
// Create three fields. Based on how they are placed, by default they will come one
// after another in the tab sequence.
var fieldOne = form.newField('parent_table_id', JSField.TEXT_FIELD, 10, 10, 100, 20);
var fieldTwo = form.newField('parent_table_text', JSField.TEXT_FIELD, 10, 40, 100, 20);
var fieldThree = form.newField('parent_table_id', JSField.TEXT_FIELD, 10, 70, 100, 20);
// Set the third field come before the first in the tab sequence, and remove the
// second field from the tab sequence.
fieldOne.tabSeq = 2;
fieldTwo.tabSeq = SM_DEFAULTS.IGNORE;
fieldThree.tabSeq = 1;
```

### NONE

Constant used in various places to set properties to "none".

**Type**\
[String](/reference/servoycore/dev-api/js-lib/string.md)

**Sample**

```js
var form = solutionModel.newForm('parentForm', 'db:/example_data/parent_table', null, false, 1200, 800);
form.navigator = SM_DEFAULTS.NONE; // Hide the navigator on the form.
```

***


---

# Agent Instructions: 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.servoy.com/reference/servoycore/dev-api/solutionmodel/defaults.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.
