# LogicAction

The component **silk:LogicAction** links an element, or function, to a LogicGrid and will be affected by the logic result of the provided criteria. If the component is an object, the toggle method will be operated. If the element is a function, the logic result will be passed as a parameter.

It can operate as a standalone component or contain the criteria values.

## Tag Definition

Used standalone:

```xml
<silk:LogicAction
  logicGrid=""
  target=""
  criteria=""
/>
```

Used as a container:

```xml
<silk:LogicAction
  logicGrid=""
  target=""
  criteria=""
>
   Contains: The group values determining the outcome of the logic action: value1:value2:...
</silk:LogicAction>
```

## Properties

<sup>\*</sup>Required property.

### logicGrid

Sets the LogicGrid connected to the logic action. This is required if the action is defined outside a LogicGrid container.\
Default Value: *Empty*.

### target<sup>\*</sup>

Defines the component or components, separated by commas, that are toggled by the logic action. This could include the name of a function that will be called every time the logic status changes.\
Default Value: *Empty*.

### criteria<sup>\*</sup>

The group values determining the outcome of the logic action: value1:value2:...\
Default Value: *Empty*.


---

# 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:

```
GET https://docs.silkbuilder.com/tags/logicaction.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.
