> For the complete documentation index, see [llms.txt](https://docs.nedyx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nedyx.com/version-1.83-de/nedyx/clearlines-funktionen/widget-funktionen/switch.md).

# SWITCH

#### Syntax

**SWITCH**(*widget;* *newEntry*; *type*)

* *widget* - das Menü-Widget, auf das die neue Einstellung angewendet werden soll - ***Wertetyp**: Widget*
* *newEntry* - der neue Eintrag, auf den das Menü umgeschaltet werden soll - ***Wertetyp**: beliebig*
* *type* - der Typ des Parameters *newEntry* - ***Wertetyp**: Konstante (optional, Standardwert: <mark style="color:red;">position</mark>)*\
  Mögliche Werte sind:
  * *<mark style="color:red;">value</mark>* - der Parameter *newEntry* enthält den Wert des neuen Eintrags
  * *<mark style="color:red;">position</mark>* - der Parameter *newEntry* enthält die Position des neuen Eintrags in der Liste der Menüeinträge

#### Bemerkungen

1. *position* ist 1-basiert, d.h. Position 1 wählt den ersten Eintrag aus, etc.
2. Wenn die Position kleiner als 1 oder größer als die Anzahl der Menüeinträge ist, ändert sich die Auswahl nicht.
3. Die Aktion "On switch" des Menü-Widgets wird direkt nach dem Aufruf der Funktion ausgeführt.

#### Beispiel

Das Schaltfeld-Widget *Reset Menu* schaltet *menu1* auf Position 1:

<figure><img src="/files/KyP3CfRzHvMjaW0lg2vr" alt=""><figcaption></figcaption></figure>

Hier wird *menu4* auf den Wert "Europa" umgeschaltet:

<figure><img src="/files/9sWLemdyNVEAo8MKdUN3" alt=""><figcaption></figcaption></figure>

*


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.nedyx.com/version-1.83-de/nedyx/clearlines-funktionen/widget-funktionen/switch.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
