# Method Selection Wizard

## Overview

The **Method Selection Wizard** gives you the option to either choose an already existing method or create a new one. It presents a organized view of all the methods that are available, sorted into categories such as "form methods," "entity methods," and "scope methods."

<figure><img src="/files/fSQEHk9PiHho9hy1S3aC" alt=""><figcaption><p>Method Selection Wizard</p></figcaption></figure>

## Sections

### Filter Box

Use the filter text box at the top to search for methods by name.

### Method Categories

Expand the categories (form methods, entity methods, scope methods) to see available methods.

### Method creation locations

**Create Method In** : Select where you want to create a new method:

#### New Form Method

<figure><img src="/files/P6G5yZfKLvMlAibel9KH" alt=""><figcaption><p>New Form Method</p></figcaption></figure>

This dialog allows you to specify a name for a new form method and choose its access level.\
Usage:

1. Specify a Method Name: Enter the name for the new form method (e.g., "onAction").
2. Select one of the options:
   * Create Public: Create a public method accessible from other forms and global scopes.
   * Create Private: Create a private method accessible only within the form.
   * Create Protected: Create a protected method accessible only within the form and its subclasses.
   * Cancel: Cancel the creation of the new method.

#### New Entity Method

<figure><img src="/files/RgE1m0lpiAJimMt6PH5o" alt=""><figcaption><p>New Entity Method</p></figcaption></figure>

This dialog prompts you to specify a name for a new entity method.\
Usage:

1. Specify a Method Name: Enter the desired name for the new entity method (e.g., "onAction").
2. Select one of the options:
   * Create: Create the method with the specified name.
   * Cancel: Cancel the creation of the new method.

#### New Global Scope Method

<figure><img src="/files/EiAU9OH1my9lyh59PRqN" alt=""><figcaption><p>New Global Scope Method</p></figcaption></figure>

This dialog allows you to specify a name for a new form method and choose its access level.\
Usage:

1. Specify a Method Name: Enter the name for the new form method (e.g., "onAction").
2. Select one of the options:
   * Create Public: Create a public method accessible from other forms and global scopes.
   * Create Private: Create a private method accessible only within the form.
   * Create Protected: Create a protected method accessible only within the form and its subclasses.
   * Cancel: Cancel the creation of the new method.

### Buttons

* **OK**: Select the highlighted method or proceed to create a new method.
* **OK & Show**: Select the method and display it in the editor.
* **Cancel**: Cancel the operation.

## General Steps for Creating a New Method

1. Open Method Selection Dialog: Start by opening the method selection dialog where you can view existing methods or choose to create a new one.
2. Choose Method Type: Decide where you want to create the new method (Form, Entity, or Scope) and select the appropriate button.
3. Name the Method: In the subsequent dialog, specify the name for the new method.
4. Set Access Level (for Form Methods): If creating a form method, choose its access level (public, private, or protected).
5. Create the Method: Click the "Create" button to finalize the creation of the method.


---

# 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/servoy-developer/object-editors/method-selection-wizard.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.
