> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell-universal/de/powershell-befehle/new-udautocomplete.md).

# New-UDAutocomplete

### Übersicht

Die Autovervollständigung ist eine normale Texteingabe, die um ein Panel mit vorgeschlagenen Optionen erweitert ist.

### Syntax

```powershell
New-UDAutocomplete [-Id <String>] [-Label <String>] [-Value <Object>] [-OnChange <Endpoint>] [-Options <Object>] [-FullWidth] [-AutoSelect] [-Variant <String>] [-Multiple] [-ClassName <String>] [-Icon <Object>] [-OnEnter <Endpoint>] [-Disabled] [<CommonParameters>]

    New-UDAutocomplete [-Id <String>] [-Label <String>] [-Value <Object>] [-OnChange <Endpoint>] -OnLoadOptions <Endpoint> [-FullWidth] [-AutoSelect] [-Variant <String>] [-Multiple] [-ClassName <String>] [-Icon <Object>] [-OnEnter <Endpoint>] [-Disabled] [<CommonParameters>]
```

### Beschreibung

Autovervollständigungs-Textfelder können verwendet werden, um dem Benutzer die Auswahl aus einer großen Liste statischer oder dynamischer Elemente zu ermöglichen. Die Eingabe in das Textfeld filtert die Liste.

### Parameter

#### -Id

Die ID der Komponente. Standardmäßig ist es eine zufällige GUID.

```
Required?                    false
Position?                    named
Default value                ([Guid]::NewGuid())
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Label

Die für das Textfeld anzuzeigende Bezeichnung.

```
Required?                    false
Position?                    named
Default value
Accept pipeline input?       false
Aliases
Accept wildcard characters?  false
```

#### -Value Der Wert des Textfelds.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-OnChangeEin Skriptblock, der aufgerufen wird, wenn sich die Auswahl ändert.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-OnLoadOptionsEin Skriptblock, der aufgerufen wird, wenn der Benutzer beginnt, in das Textfeld zu tippen. Die Variable $Body enthält den eingegebenen Text. Sie sollten ein JSON-Array mit Werten zurückgeben, die das Ergebnis der Eingabe des Benutzers sind.Required?                    truePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-Options Statische Optionen, die im Auswahl-Dropdown angezeigt werden. Wenn der Benutzer tippt, werden diese Optionen gefiltert.Required?                    falsePosition?                    namedDefault value                @()Accept pipeline input?       falseAliasesAccept wildcard characters?  false    -FullWidth \[\<SwitchParameter>]        Whether the component should take up the full width of its parent.Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false    -AutoSelect \[\<SwitchParameter>]        Whether the component should automatically be selected if there was only one total option with the options array.Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false-VariantDie Variante des Textfelds. Gültige Werte sind: "filled", "outlined", "standard"Required?                    falsePosition?                    namedDefault value                standardAccept pipeline input?       falseAliasesAccept wildcard characters?  false    -Multiple \[\<SwitchParameter>]        Whether multiple items can be selected.Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false-ClassNameEine CSS-Klasse, die auf die Komponente angewendet wird.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-Icon Das Symbol, das vor dem Textfeld angezeigt wird. Verwenden Sie New-UDIcon, um den Wert für diesen Parameter zu erstellen.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false-OnEnterEin Skriptblock, der aufgerufen wird, wenn der Benutzer innerhalb des Autovervollständigungs-Textfelds die Eingabetaste drückt.Required?                    falsePosition?                    namedDefault valueAccept pipeline input?       falseAliasesAccept wildcard characters?  false    -Disabled \[\<SwitchParameter>]        Whether this autocomplete is disabled.Required?                    falsePosition?                    namedDefault value                FalseAccept pipeline input?       falseAliasesAccept wildcard characters?  false    \<CommonParameters>        This cmdlet supports the common parameters: Verbose, Debug,        ErrorAction, ErrorVariable, WarningAction, WarningVariable,        OutBuffer, PipelineVariable, and OutVariable. For more information, see        about\_CommonParameters (<https://go.microsoft.com/fwlink/?LinkID=113216).Ausgaben--------------------------> BEISPIEL 1 --------------------------PS >New-UDAutocomplete -Options @('Test', 'Test2', 'Test3', 'Test4') -Id 'autocomplete1' -FullWidthBasic autocomplete|The value must be chosen from a predefined set of allowed values.-------------------------- EXAMPLE 2 --------------------------PS >New-UDAutocomplete -Options @("Test", "No", "Yes") -Multiple  -Id 'autocomplete2' -FullWidthMulti-Select|Allow the user to select multiple values.-------------------------- EXAMPLE 3 --------------------------PS >New-UDStack -Content {PS >    New-UDAutocomplete -Options @("Test", "No", "Yes") -Variant 'filled'  -Id 'autocomplete3' -FullWidthPS >    New-UDAutocomplete -Options @("Test", "No", "Yes") -Variant 'outlined'  -Id 'autocomplete4' -FullWidthPS >    New-UDAutocomplete -Options @("Test", "No", "Yes") -Variant 'standard'  -Id 'autocomplete5' -FullWidthPS > } -Direction 'column' -FullWidthVariants|Change the the style of the autocomplete textbox.-------------------------- EXAMPLE 4 --------------------------PS >New-UDAutocomplete -Options @("Test", "No", "Yes") -OnChange {PS >    Show-UDToast $EventDataPS > }  -Id 'autocomplete6' -FullWidthHandling changes|Execute PowerShell when the autocomplete changes.-------------------------- EXAMPLE 5 --------------------------PS >New-UDAutocomplete -Options @("Test", "No", "Yes") -OnEnter {PS >    Show-UDToast $EventDataPS > } -Id 'autocomplete7' -FullWidthOnEnter|Execute PowerShell when the user presses enter.-------------------------- EXAMPLE 6 --------------------------PS >New-UDAutocomplete -OnLoadOptions {PS >   @('Test', 'Test2', 'Test3', 'Test4') | Where-Object { $\_ -match $Body } | ConvertTo-JsonPS > } -Id 'autocomplete8' -FullWidthAsynchronous options|Creates an autocomplete with a dynamically filtered set of options-------------------------- EXAMPLE 7 --------------------------PS >New-UDAutocomplete -Options @(PS >    New-UDAutocompleteOption -Name 'Test' -Value 'test' -Group 'Group1'PS >    New-UDAutocompleteOption -Name 'Test2' -Value 'test2' -Group 'Group1'PS >    New-UDAutocompleteOption -Name 'Test3' -Value 'test3' -Group 'Group2'PS >    New-UDAutocompleteOption -Name 'Test4' -Value 'test4' -Group 'Group2'PS > ) -Id 'autocomplete9' -FullWidth


---

# 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.devolutions.net/powershell-universal/de/powershell-befehle/new-udautocomplete.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.
