> For the complete documentation index, see [llms.txt](https://docs.eximee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/jezyk-wyrazen-definiowania-warunkow-warunki-z-getvalue.md).

# Expression language for defining conditions (conditions with getValue)

#### Condition editor <a href="#jezykwyrazendefiniowaniawarunkow-warunkizgetvalue-edytorpisaniawarunkow" id="jezykwyrazendefiniowaniawarunkow-warunkizgetvalue-edytorpisaniawarunkow"></a>

[Advanced condition editor](/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/jezyk-wyrazen-definiowania-warunkow-warunki-z-getvalue/zaawansowany-edytor-warunkow.md)

#### Conditions in JavaScript format <a href="#jezykwyrazendefiniowaniawarunkow-warunkizgetvalue-warunkiwformaciejavascript" id="jezykwyrazendefiniowaniawarunkow-warunkizgetvalue-warunkiwformaciejavascript"></a>

{% hint style="warning" %}
Conditions within composite components

For conditions written in composite components, variable/field identifiers must be preceded by the character **@** e.g. @GesCombobox1.
{% endhint %}

It is possible to describe all conditions defined in the application template using expressions in the language **JavaScript**.

JS conditions provide the following methods:

* *getValue("ID\_KOMPONENTU")* - the recommended way to return a component value (any other may cause performance issues)
* *getData*(*"COMPONENT\_ID","COMPONENT\_ATTRIBUTE"*) - returns the value of the specified component attribute; available attributes can be found here [Component attributes](/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/jezyk-wyrazen-definiowania-warunkow-warunki-z-getvalue/atrybuty-komponentow.md)
* *isVisible("ID\_KOMPONENTU")* - a way to check whether a component is visible (listening required; you cannot retrieve the visibility of a radio button or the visibility of elements inside a repeating section from outside the repeating section)
* *getStatementValue("COMPONENT\_ID", "MID\_DECLARATION") -* allows returning the value of the selected declaration for the Declarations component.

All values of fields available during condition evaluation are text values, so for numeric or boolean operations, a deliberate conversion must be performed.

Examples of conditions in the format **JavaScript**:

```javascript
// integer comparison of a TextField-type field
parseInt(getValue("GesTextField3"))>5
  
// floating-point comparison of a TextField-type field
parseFloat(getValue("GesTextField5"))<200.001
  
// logical value comparison (equal) of a CheckBox-type field
getValue("GesCheckbox1")=="true"
 
// logical value comparison (different) of a CheckBox-type field
getValue("GesCheckbox1")!="true"
 
// text value comparison of a RadioGroup-type field
getValue("GesRadioGroup1")=="audi"
  
// checking whether a value, e.g. session variable, is not empty
!!getValue("nazwiskoZew")
  
// checking whether a value, e.g. session variable is empty
!getValue("nazwiskoZew")
  
// checking whether the statement with mid oswiadczenie1 in the component with id GesStatementPopup1 has been accepted
getStatementItem("GesStatementPopup1","oswiadczenie1") == "true"
  
// checking whether the statement with mid zdrowotne in the component with id GesStatementFlat5 (located in a composite component) has been accepted
getStatementItem("@GesStatementFlat5","zdrowotne")=="false"
 
 
// required condition for the field if the others are empty
!!!(getValue("@GesTextField13")||getValue("@GesTextField8"))
 
 
// checking combobox values
getValue("@GesCombobox1")!=2&&getValue("@GesCombobox1")>0
 
 
// checking whether the TextField is visible
isVisible("@GesTextField1")=="true"
 
 
// checking whether the number of characters in TextField is 10
getValue("GesTextField5").length==10
```

Conditions can use identifiers (**id**) of all fields available in the application template.

The syntax allows you to define:

* negation of an expression using the "!" operator at the beginning of the expression
* conjunction of expressions using the "&&" operator, e.g. getValue("@GesCombobox1")==1&\&getValue("@GesCombobox1")==2
* alternative of expressions using the "||" operator, e.g. getValue("@GesCombobox1")==1||getValue("@GesCombobox1")==2

The following types can be used in expressions:

* constant values
  * text
  * numeric
  * binary - true and false
* component identifiers, e.g. GesTextField1
* application variable identifiers, e.g. partner.


---

# 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.eximee.com/documentation/documentation-en/budowanie-aplikacji/logika-biznesowa/jezyk-wyrazen-definiowania-warunkow-warunki-z-getvalue.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.
