---
title: "au-widget-function-trigger/IAuWidgetFunctionTriggerConfig | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/ui-framework/widgets/reference/au-widget-function-trigger.IAuWidgetFunctionTriggerConfig/"
---

# au-widget-function-trigger/IAuWidgetFunctionTriggerConfig

> Provides properties that are used to execute synchronous or async functions.

## Interfaces

### IAuWidgetFunctionTriggerConfig

You can use these properties in **params** of the `AuWidgetFunctionTrigger` class.

The following example illustrates how you can listen for property changes to execute a custom function.

```json
{
  "widgets": [
   {
      "name": "name",
      "type": "option",
      "params": {
          "type": "list",
          "title": "Name",
          "prompt": "Choose a name",
          "values": [
              { "title": "Jack" },
              { "title": "James" },
              { "title": "John" }
           ]
      }
   },
   {
     "name": "myFunction",
     "type": "function-trigger",
     "params": {
          "arguments": [
             "{{ $['name']._.title }}",
             "{{ $['name']._.title }}"
          ],
          "callback": [
              "{{ #function(arg1, arg2) console.log(arg1, arg2) }}",
              "{{ #asyncFunction await new Promise(...) }}"
          ]
          "catch": [
             "{{ #function console.error("failed") }}",
          ],
          "finally": [
             "{{ #function console.log("cleanup") }}",
          ]
     }
   }
 ]
}
```

#### Properties

##### arguments

```ts
arguments: string | string[];
```

An array of parameters change of which should trigger specified callbacks.

##### callback

```ts
callback: Function | Function[];
```

A function `("{{#function <expression>}}")` or an array of functions that are executed when `arguments` parameter changes.

##### catch

```ts
catch: Function | Function[];
```

A function `("{{#function <expression>}}")` or an array of functions that are executed if the `callback` fails.

##### enabled

```ts
enabled: boolean;
```

If `false`, the `callback` will not be executed. The default value is `true`.

##### finally

```ts
finally: Function | Function[];
```

A function `("{{#function <expression>}}")` or an array of functions that are executed after the `callback`, regardless of its outcome.

##### lock

```ts
lock: string | string[];
```

The widget names that should be locked while waiting for the `callback`. The editor will show a preloader on this widget.
