# Adapptio User Documentation

Deliver professional WEB applications in record time!

<div align="center"><img src="https://static.hexio.io/adapptio/Adapptio-logo-light.svg" alt=""></div>

{% hint style="success" %}
[Sign up now for free!](https://adapptio.cloud/sign-up)
{% endhint %}

## What is Adapptio?

Adapptio is a cloud platform for building web applications in record time. It uses a next-gen development based on blueprint driven development and reactive programming. The platform allows you to set up your project within seconds, simply add integrations to your data sources, create front-end user interface and deliver end-to-end application 3x to 10x faster using Delphi/Visual Studio style editor. And finally, deploy your app to the cloud with a few clicks.

## What can I do with Adapptio? <a href="#oieuz0je06h5" id="oieuz0je06h5"></a>

Basically you can build any WEB application you want. \
Here are some use cases and examples for inspiration:

* [Complex SaaS Platforms](/working-with-adapptio/examples/saas-platforms)
* [Customers Portals](/working-with-adapptio/examples/customers-portals)
* [Information Systems](/working-with-adapptio/examples/information-systems)
* [Internal Tools](/working-with-adapptio/examples/internal-tools)
* [IoT Applications & Dashboards](/working-with-adapptio/examples/iot-applications)
* [Smart Portals](/working-with-adapptio/examples/smart-portals)
* [Analytics & Calculators](/working-with-adapptio/examples/analytics-and-calculators)
* [Statistics & Monitoring Panels](/working-with-adapptio/examples/statistics-and-monitoring-panels)
* [API Data Visualization](/working-with-adapptio/examples/api-data-visualization)
* [Simple Games](/working-with-adapptio/examples/simple-games)

## Adapptio is FREE! <a href="#xwpnlht45vlu" id="xwpnlht45vlu"></a>

Development in Adapptio is completely **FREE!** You start pay once you want to release your application for end-users. The actual prices you can find [here](https://www.adapptio.com/#pricing).

{% hint style="success" %}
[Sign up now for FREE!](https://adapptio.cloud/sign-up)
{% endhint %}

## Become a professional in a short period <a href="#oieuz0je06h5" id="oieuz0je06h5"></a>

Working with Adapptio is intuitive, especially for someone with programming and software architecture knowledge. You will be able to build any applications you want just after deploying your first application.

{% content-ref url="/pages/lGJ0UKMg04KdvPbYyLJb" %}
[Quickstart](/getting-started/quickstart)
{% endcontent-ref %}

### Cloud and security <a href="#xx1bu59j3836" id="xx1bu59j3836"></a>

We use the corporate data center of our parent company placed in Czech Republic with own cloud solution based on Kubernetes. The cloud and hardware solutions provide maximum flexibility and security to you. Applications, data, and passwords are fully encrypted, protected and we also know where exactly lies.

### On-Premise <a href="#id-2hj26yb915g7" id="id-2hj26yb915g7"></a>

If necessary, your entire project can be deployed on your side as well.

### Browsers and OS support <a href="#browsers-and-os-support" id="browsers-and-os-support"></a>

| Browser                                                                                                                                                                                                                                                                                  | Support                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fg6lmUre01MMHTuOq8kZN%2FGoogle%20Chrome%20icon.svg?alt=media&amp;token=807722a2-359d-42eb-beb8-4926c6df6913" alt="" data-size="original"> Google Chrome | ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FN3sfh5RVI1br9rlR12Zt%2FYes%20icon.svg?alt=media\&token=eb347a08-14e4-4b70-bebb-da6634256290) Full support of latest versions                                                                                                                                                                                                     |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FH653hk24uS9OfME4aVFB%2FFirefox%20icon.svg?alt=media\&token=e9c705c3-8bbe-4948-a648-ceaacff837b6) Mozilla Firefox                                             | ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FN3sfh5RVI1br9rlR12Zt%2FYes%20icon.svg?alt=media\&token=eb347a08-14e4-4b70-bebb-da6634256290) Full support of latest versions                                                                                                                                                                                                     |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FgffCiCIKYbYqy2Cw0PAd%2FOpera%20icon.svg?alt=media\&token=55905a9a-1a92-4ddf-b8b3-86def2076b7f) Opera                                                         | ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FN3sfh5RVI1br9rlR12Zt%2FYes%20icon.svg?alt=media\&token=eb347a08-14e4-4b70-bebb-da6634256290) Full support of latest versions                                                                                                                                                                                                     |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FvCr6GmOmUucdbT42x5A8%2FMicrosoft%20Edge%20icon.svg?alt=media\&token=966cf598-461d-4310-9cbe-6ccbce7dbce7) Microsoft Edge                                     | ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FN3sfh5RVI1br9rlR12Zt%2FYes%20icon.svg?alt=media\&token=eb347a08-14e4-4b70-bebb-da6634256290) Full support of latest versions                                                                                                                                                                                                     |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FAq56g4AWXmGz3RrmTRzO%2FSafari%20icon.svg?alt=media\&token=82345352-4076-4417-8a89-3aa8b3bb76d7) Safari                                                       | ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FN3sfh5RVI1br9rlR12Zt%2FYes%20icon.svg?alt=media\&token=eb347a08-14e4-4b70-bebb-da6634256290)![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FqQAcXQd0TrOwnzAgmCnR%2FNo%20icon.svg?alt=media\&token=66d14df4-f40a-4999-ae1c-255b1929dd85) Style issues |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F5WMImno9sJqh1rG7BRRF%2FInternet%20Explorer%20icon.svg?alt=media\&token=ae3a0541-0c76-49e8-b1c1-d0ffeab20cb4) Internet Explorer                               | ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FqQAcXQd0TrOwnzAgmCnR%2FNo%20icon.svg?alt=media\&token=66d14df4-f40a-4999-ae1c-255b1929dd85) Not supported                                                                                                                                                                                                                        |


# Quickstart

Deliver professional WEB applications in a record time!

The only think you need is an account, so sign up for free now.

{% hint style="success" %}
Step 1: [Create an account](https://adapptio.cloud/sign-up)
{% endhint %}

Making a new account is easy. You can use your existing Google account or create a new one with your e-mail. Please follow the link [www.adapptio.cloud](https://adapptio.cloud/sign-up), and get started now.

### Creating your first application <a href="#id-2cx3k5hhf4go" id="id-2cx3k5hhf4go"></a>

After new registration you will be prompted to enter your Organization name and Application name. It is filled with your name and `My First App` by default, but feel free to change it as you wish. Then click on Create button and you will be redirected to the application overview.

### Application overview <a href="#id-2cx3k5hhf4go" id="id-2cx3k5hhf4go"></a>

Just after a few seconds your editor will be ready to use and you can start creating your application. Click on the button OPEN EDITOR to continue. You can also manage your application using this page - in navigation you see detail, user management, infrastructure management and your subscription plans.

{% hint style="success" %}
Step 2: Open editor
{% endhint %}

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F9P2MDtZgN0p75kCGgzNf%2F3?alt=media)

The running application will be available after you deploy it from the editor.

### Build your first application <a href="#u1zcwnonbcoa" id="u1zcwnonbcoa"></a>

Opening an editor will allow you to work with graphical views representing web pages. Also, work with integrations to your systems and actions calling integrations to get data, transform them and pass to the views.&#x20;

{% hint style="success" %}
Step 3: [Build Hello World application](https://www.youtube.com/watch?v=Oi4RFM2m-hc\&list=PLFsqe-Gje-xaWwaJsiecZsSy6TQMpf7Or)
{% endhint %}

![Getting Started](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FkUeBeOUsHA6VCLIVCWlP%2Fimage.png?alt=media\&token=b9168a7e-7f15-4e8d-9f65-ee783eb004b5)

You can preview your application in the upper-right corner by clicking on the eye icon. Closing the preview mode returns you to the editor, where you can try to run the application itself by clicking on the icon next to the the preview. It won't be possible till you click on the deploy button. Choose your production space, and you are ready to deploy.

{% hint style="success" %}
Step 4: Deploy your application
{% endhint %}

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fy8qBhvgFLP6XKT2q2Uui%2Fimage.png?alt=media\&token=0983e747-baf2-4016-90e8-e5eff48fcd07)

### Running your application <a href="#pbh1nulvt349" id="pbh1nulvt349"></a>

After deploying your application, it can be open directly from the editor, just click on the open application button next to the deploy button or outside of the editor in Adapptio platform by clicking on the OPEN APPLICATION button, wherever you can run, restart or stop your application.

{% hint style="success" %}
Step 5: Open your application
{% endhint %}

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F9w9XRUxJFm7x9EJmsUjw%2Fimage.png?alt=media\&token=af51e8d7-bd76-4874-99e2-e0e00314fcfb)

### Login into the application <a href="#kdrq8vms6ry6" id="kdrq8vms6ry6"></a>

Once the application is running and open, it is secured by our login screen. You can simply click to Login with Adapptio and follow the login process.

{% hint style="success" %}
Step 6: Sign in to your application
{% endhint %}

![Login screen](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FSg4kM01hJBA9ocX7TWy4%2Fimage.png?alt=media\&token=61ee43ea-3a92-4ba2-a79d-e16fb60b0abc)


# Architecture Overview

Deliver professional WEB applications 3-5x faster!

The overall architecture of the Adapptio Framework is divided into several parts; Integrations, Actions, API Endpoints and Views. The Integrations, Actions and API Endpoints are running at the secured back-end in the Adapptio cloud; meanwhile, the Views are running at the client-side in your browser.

Integrations authenticate and call API, load static data, and connect databases using a secure proxy.

The actions permeate between the user interface and integrations and provide a secure connection, data transformation and pass data from integrations to the user interface and vice versa.

The Views represent a visual output of your applications run in a web browser on computers, tablets, or mobile devices.

The complete applications can be run in the Adapptio cloud or self hosted in your infrastructure.

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FpyRXLqeEkJHIVLm2FvXy%2Fdiagram%20colored%20on%20transparent%20bg.png?alt=media\&token=11fdc5ff-d806-4f4e-819d-751140f0f514)

{% content-ref url="/pages/3yog1GvnQKR507MntaqF" %}
[Views](/getting-started/architecture-overview/views)
{% endcontent-ref %}

{% content-ref url="/pages/1Z6dQmAoCXvd1gFZb4mw" %}
[Actions](/getting-started/architecture-overview/actions)
{% endcontent-ref %}

{% content-ref url="/pages/AhCrqES19FZQrLDNiJRE" %}
[Integrations](/getting-started/architecture-overview/integrations)
{% endcontent-ref %}

{% content-ref url="/pages/FeY23ZTneXdG3trVrtWB" %}
[API Endpoints](/getting-started/architecture-overview/api-endpoints)
{% endcontent-ref %}

{% content-ref url="/pages/8Iev3YFaghj9MzGU9Rww" %}
[Routes](/getting-started/architecture-overview/routes)
{% endcontent-ref %}

{% content-ref url="/pages/SdVOY64oLhCSNwW8tXfo" %}
[Events](/getting-started/architecture-overview/events)
{% endcontent-ref %}

{% content-ref url="/pages/4iLTtocKn1Y245Cj310W" %}
[Assets](/getting-started/architecture-overview/assets)
{% endcontent-ref %}


# Views

*Views* representing the graphical user interface contain as many components as required. Each application can be composed of many different *Views*, nested or opened as a solo page.

{% hint style="info" %}
Application **is always starting** from the *View* called **`MainView`**, and **it's mandatory**.
{% endhint %}

![Application Views](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FCe6SiTUML8BKqh2eW3Xv%2Fimage.png?alt=media\&token=47f13c4f-f67a-4056-891a-2fb7bf43fdd0)

### 1. Creating and Working with a View

In the *Main Menu* settings, any new or existing *View* can be *created*, *renamed*, *duplicated*, *deleted*, *exported*, or *changed* in its parent directory.

{% tabs %}
{% tab title="Main Menu\[Create New View]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F3CQprjqtSme4oX2x1bpz%2Fimage.png?alt=media\&token=9ea2e23e-7c9a-43ab-9ab2-4a281801611d)
{% endtab %}

{% tab title="Main Menu\[Name & Locate New View]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F5U8nAKRm3UqpFbUParcM%2Fimage.png?alt=media\&token=e7ffdafb-8c2e-4290-aae4-1f2368c12332)
{% endtab %}

{% tab title="Main Menu\[List of Existing Views & it's Options]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FOfaidME72b4FDQd1NdaW%2Fimage.png?alt=media\&token=0e3c415a-d775-4c3a-9780-ee043e06a204)
{% endtab %}
{% endtabs %}

### 2. Views Tabs

Switching between opened *Views* can be done by clicking on its tabs and closing them by clicking on the cross icon.

{% hint style="info" %}
Any unsaved changes **will be lost** after closing a tab!
{% endhint %}

{% tabs %}
{% tab title="View\[Tabs & Closing]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FVJX6wd16CsdkKllfJ1ft%2Fimage.png?alt=media\&token=f847f51f-f9c2-47ce-8c07-f1b416a97205)
{% endtab %}
{% endtabs %}

### 3. Screen Resolutions

Switching between the screen resolution allows displaying proper responsivity on different devices. Each of the resolutions is represented by the pixel value, which can be modified if required.

{% hint style="info" %}
The **Base Screen** setting is considered to be a **default** in herity chain.
{% endhint %}

{% tabs %}
{% tab title="Base Screen" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FqmQXmxZSeYHV6cJP59Ol%2Fimage.png?alt=media\&token=3368b2c4-599c-473e-b619-c8a57d390dd4)
{% endtab %}

{% tab title="Phone Screen" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FB7tQ5qFKjz5vRgT0FAIE%2Fimage.png?alt=media\&token=93580e8f-837a-4531-adf2-4b202be1f8ea)
{% endtab %}

{% tab title="Custom Pixel Ratio" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FVGy0grbQjfUCpB6gzZiC%2Fimage.png?alt=media\&token=7f40beeb-90fa-46f6-89d7-50f80d569583)
{% endtab %}
{% endtabs %}

### 4. Undo & Redo

Each of the existing *Views* has its own *undo* and *redo* steps if necessary.

{% tabs %}
{% tab title="Undo & Redo" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FdbDgvzZbMF4cJigYxpaQ%2Fimage.png?alt=media\&token=e1e828d9-52d5-4670-be84-5ef6ed5b6a0c)
{% endtab %}
{% endtabs %}

### 5. Toggling the Panels

Resizing the *Canvas Work-field* during developing applications, especially on the smaller screens, can take advantage of by switching off the left and right panels by clicking on the *toggle buttons*.

{% tabs %}
{% tab title="Left Toggle Button" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FNcG0Y56M2wPM0tX3rquJ%2Fimage.png?alt=media\&token=19226977-bc8d-409c-84ae-e2abfdbf5843)
{% endtab %}

{% tab title="Right Toggle Button" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F4znEr1mrMAZZhfkW9Igh%2Fimage.png?alt=media\&token=edfcb921-1151-411d-b4bf-118066b87efd)
{% endtab %}
{% endtabs %}

### 6. Saving a Current Content

The *Save button* will save the composition of a *current View*; meanwhile, *Save All button* will save all opened *tabs*, even *actions*, and *integrations*.

{% tabs %}
{% tab title="Save View Button" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FHQEPi8Qsrm8Ge1mfe92B%2Fimage.png?alt=media\&token=263bec92-d954-4ab5-b78a-9efe7e84544e)
{% endtab %}

{% tab title="Save All Application Button" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FESJSViNegkxpXyDcdB4P%2Fimage.png?alt=media\&token=c74f5f9c-311c-47c4-91b3-505e82d53589)
{% endtab %}
{% endtabs %}

### 7. View the Options Panel

The *Options Panel* allows direct work with a *current View*, like *renaming*, *moving* to different directories, *duplicating* actual content into a new *View*, *watching* revision history, *exporting* its content to *YAML*, and deleting the whole *View*.

{% hint style="info" %}
The Revision history would be available as soon as possible.
{% endhint %}

{% tabs %}
{% tab title="Options Panel" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Ff0UKu5UVLoCndfFILFk1%2Fimage.png?alt=media\&token=d4c1d885-444a-4dbf-97bf-8f1ac5426690)
{% endtab %}
{% endtabs %}

### 8. Design & Preview & Debug

1. The **Design Mode** is the essential part of designing *Views*. You can drag and drop components into *Canvas Work-field* and edit their properties.
2. The **Preview Mode** is representing the visual output of a current *View* and active components are fully available.
3. The **Debug Mode** shows the current *View* blueprint that is taking advantage of checking exported code. Any immediate changes are fully responsive.

{% tabs %}
{% tab title="Design Mode" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FenFfv7tatU6TZiwxhhV3%2Fimage.png?alt=media\&token=3851ec0f-36cc-4a1f-a05b-a7ab9bf4a45c)
{% endtab %}

{% tab title="Preview Mode" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FdkPXQu6IDWaNRitACQp5%2Fimage.png?alt=media\&token=9b22c3fb-b520-4e6c-9539-099761fa4a5f)
{% endtab %}

{% tab title="Debug Mode" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FmP4GRJ2X4PX0vf5l7woI%2Fimage.png?alt=media\&token=3a62d0bd-f6d6-4bfc-99d3-c3caf16b0589)
{% endtab %}
{% endtabs %}


# Actions

*Actions* represent a business logic of a broad spectrum of functions wired together in the *Flow Canvas*. They are commonly used to connect integrations, execute javascript code, and pass data to *Views* and vice versa.

*There exist three ways how to work with Actions in Adapptio.*

### 1. Binding a Data Source

*Adding Data from Action* provides a connection between *Views* and *Actions*, which can be referenced as a data source for any required component. *Action* must have `LOADED` status or be reloaded by the **Update State** *Method* from Events.

{% tabs %}
{% tab title="Outline Panel" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FbfmHDbqvRl8YdY3O9lOm%2Fimage.png?alt=media\&token=85634bc4-1de2-4ecf-a717-7307a0a4a2f5)
{% endtab %}

{% tab title="Inspector" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F1DtmqZYRh3CIApagQkLi%2Fimage.png?alt=media\&token=fadffb4c-15fd-458a-9490-0017e23840d1)
{% endtab %}

{% tab title="Data Explorer" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F20hFFiYcJbvOmel4VrT7%2Fimage.png?alt=media\&token=3ca6a0e6-8a58-4ed6-b006-9e865875017c)
{% endtab %}

{% tab title="Event\[Update State]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FoNfc2wJRfETGqylwWICC%2Fimage.png?alt=media\&token=eb9486bc-bddd-47ed-8da7-48fea5dea49b)
{% endtab %}
{% endtabs %}

### 2. Calling an Action from an Event

The following way to call *Actions* is by the **Call Action** *Method* from *Events*. Any existing components can trigger it depending on the required *Event Logic*.

{% tabs %}
{% tab title="Event\[Call Action]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F8eE021eeW4bIxCrJP6Sl%2Fimage.png?alt=media\&token=b638c315-0971-4ac0-9dc9-5f104fe4d995)
{% endtab %}

{% tab title="Call Action\[Settings]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FbIK81g9xogHcg84lggJX%2Fimage.png?alt=media\&token=a0640b86-5805-427d-bf44-e2f8cadb9049)
{% endtab %}
{% endtabs %}

### 3. Scheduling an Action

Scheduling *Actions* are independent of any superior Views and are executed once or in specific intervals at the backend.

{% tabs %}
{% tab title="Action Settings" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fp6twC4DaEuFUIvAkz9vA%2Fimage.png?alt=media\&token=55f8a9f9-29f0-4f0d-84a4-fd5c2ef67a9f)
{% endtab %}
{% endtabs %}


# Integrations

The *Integrations* are providing a data connector between the required *Datasource* and *Actions*.

![Sample of the available Integrations](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Ft8PUoOZrA34T5SFF3K9m%2Fimage.png?alt=media\&token=fe23fa46-9682-49c2-bd76-38920555514e)

### 1. Creating a New Integration

Simply click on the *Create New* option in the *Main Menu*, select the required *Integration*, name it, and place it in the desired location.

{% tabs %}
{% tab title="Create New Integration" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fw3Fx23uZ3Wuo3Lcmqmwr%2Fimage.png?alt=media\&token=d9e3b0a7-bb0c-407e-a5fd-bc887843112c)
{% endtab %}

{% tab title="Selecting New Integration" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FrM0xnzSnaXXNDv3kZBKb%2Fimage.png?alt=media\&token=9f5da4da-cf48-425b-b98e-bbe5d5ef6395)
{% endtab %}

{% tab title="Naming & Selecting location" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FdSO8JsBtRSNBVlTLZPZP%2Fimage.png?alt=media\&token=32ec4294-d55e-40f5-9829-5cd2b59c7531)
{% endtab %}
{% endtabs %}

### 2. Working with Integrations

Any existing *Integration* can be *renamed*, *moved*, *duplicated*, or *deleted* in the *Main Menu*; click on the *Options field*.

{% tabs %}
{% tab title="Editing Integrations" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FUYtWxcJx2fi3HrYgK8qt%2Fimage.png?alt=media\&token=72cde815-958d-4dc8-8f1a-597ef3556066)
{% endtab %}
{% endtabs %}

### 3. Configuring Integrations

Each of the *Adapptio Integrations* has its properties, which must be configured appropriately. Clicking on the existing *Integration* will open the properties window.

{% tabs %}
{% tab title="Configuring Integration" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FQBQgpH2HjWSpW3UHpGDA%2Fimage.png?alt=media\&token=170af0e5-569c-461c-9640-ca83867629c9)
{% endtab %}
{% endtabs %}

### 4. Connecting Integrations into the Actions

*Functions* become available in the *Action Flowchart Editor* with the existing *Integration*. We can wire together all desired functions from this moment, depending on what kind of *Action* we are doing. It will be mostly about reading, uploading, editing, and deleting bound *Datasource*.

{% tabs %}
{% tab title="Action Flowchart\[Available Integration Functions]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F01LnnMgCjPfch3yrkpwn%2Fimage.png?alt=media\&token=5772d7b3-598e-4730-83e3-7fa9ab8256eb)
{% endtab %}

{% tab title="Action Flowchart\[Canvas]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FjK2ZEiULfu9WKxHRlYIl%2Fimage.png?alt=media\&token=e87a7b84-e5a3-4040-9ce7-a4b74fe28d70)
{% endtab %}
{% endtabs %}

### 5. List of Available Integrations

The most required *Integrations* like working with databases and *rest API* are available in the Adapptio. Our team is consistently developing new implementations.

{% hint style="info" %}
Missing some *Integration*? Don't hesitate to ask for our support team or community forum.
{% endhint %}

| Adapptio Icons                                                                                                                                                                                                      | Name of Integrations |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fzt9ON4LtpuISaCasIBkh%2Fimage.png?alt=media\&token=253611eb-123a-4ae1-8f9f-8d3ca69e0b73) | **graphQL**          |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F1iuzBVX3sCTx6pUb3IHC%2Fimage.png?alt=media\&token=0782373f-f443-42ce-a2bc-8d68edb2c553) | **inMemoryDB**       |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FwNQ90Pl4u1RXIxPOgE6m%2Fimage.png?alt=media\&token=576be750-86aa-4198-af47-c6d5455f27aa) | **gRPC**             |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FSmgQtWVtXaQwAcS2REh4%2Fimage.png?alt=media\&token=13335f39-14b8-46dc-a93d-dc7dce8d3e19) | **influxDB**         |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FcI6ontP46IMDYHNmC9BI%2Fimage.png?alt=media\&token=eaaf6cbb-63d4-4482-9210-4aaad6b3ed77) | **REST API**         |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FqFs8foXAo1pExrgkrhxg%2Fimage.png?alt=media\&token=eab2e2ff-537f-4f18-b11d-e2f7a773d54f) | **Static Text**      |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FayEMlNaY7zVhgF3gU3Uv%2Fimage.png?alt=media\&token=deca9c5d-ae5c-4f58-b560-b069004ecd3b) | **Static CSV**       |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FYsc30BHOEdZrqcUihoqJ%2Fimage.png?alt=media\&token=a9b7bc92-40d9-4e1e-8748-237edd4c9532) | **Static YAML**      |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FKgECtkaVOMQsawEmocXP%2Fimage.png?alt=media\&token=1235065a-ff9a-4b3d-b26e-b54a27085e8f) | **Static JSON**      |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FF4IFLt8bXMwpxtSuxjDu%2Fimage.png?alt=media\&token=5cbebb13-e6a4-42fc-b323-329b1af89b6a) | **Static XML**       |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fwoij00zGX9j16GX4CRBu%2Fimage.png?alt=media\&token=1cd4b525-0e60-494c-b198-2984705c03c5) | **PostgreSQL**       |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fhavt8i5uVeTZ46U0TjXv%2Fimage.png?alt=media\&token=9a8cb99b-2d0f-4583-8425-a713cf115b63) | **MySQL**            |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FMYHNCc9STHlQwgBjQ3Ut%2Fimage.png?alt=media\&token=8ee49eb5-c99f-4a68-89bc-6304ebea310c) | **MS SQL**           |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F4ytNceB1aiMzEPe8k7sY%2Fimage.png?alt=media\&token=2439b659-841c-468c-acdb-3f12b05a3afa) | **Oracle DB**        |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FIOJZrd8R0MkN7gahfQoA%2Fimage.png?alt=media\&token=473141d5-32af-4b44-a36e-6d85d597db0c) | **SMTP Client**      |
| ![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FNCRVedQIXJDZJZONfPFY%2Fimage.png?alt=media\&token=69661534-721d-4e56-993e-566d190cc6eb) | **AWS S3**           |


# API Endpoints

Endpoints enable to access application using API. You can specify full configuration of path, method, validate body using schema and so on.

{% hint style="info" %}
The endpoint will be registered in `/endpoints/v1/<path>`
{% endhint %}

<figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FSeOkepFw92v5CaNOpAoB%2Fimage.png?alt=media&amp;token=de8458e4-e41c-416f-ac16-b1b79e3252e3" alt=""><figcaption></figcaption></figure>


# Routes

Routes allow you to define custom URLs paths that the Routes component can respond to, switching content based on the route URL.

To add any new route, just open `routes` resource from the main menu.

<figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FvYcz2yyBrWikVkGTOfb1%2Fimage.png?alt=media&amp;token=5918369f-a235-4451-b3a0-302b7d832b40" alt=""><figcaption></figcaption></figure>

The key is autogenerated and serves for dynamic referencing a route. The label is user friendly name and the path is URL path. You can also include a parameter, which starts with `:`.

For example, route UserDetail can look like `/users/id/:userId` -> this route will have a single parameter called userId.

<figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FmJLFpJftlnLsPf2gdoay%2Fimage.png?alt=media&amp;token=70b5ff2e-cd3c-42ee-9e49-5b23f332ddba" alt=""><figcaption></figcaption></figure>

All registered routes are available in some components which support Link property.

For example, this settings make from button a link to the Signup route -> after click you will see the url in your browser or in Tester.

<figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F2m5hHL7olwOXALXTammc%2Fimage.png?alt=media&amp;token=7859daf9-728e-4b62-9a57-7f00323c1f34" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Link to a route changes the URL address, but has no influence on the content. For defining content you need to use the Routes component.
{% endhint %}


# Events

The *Events* are conditionally triggered *Methods* if something happens. In terms of distribution, we can split *Events* into two groups; one group is bound with *Views*, and the second one is attached with the *Components*.

![Application calling sidebar by an Event](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FcijXIqkuuLXSlNGsNGgt%2Fimage.png?alt=media\&token=f2467c78-611f-4a72-8528-9920ddac5cc2)

### 1. Components Events

Except for a few *Layout components* rest of them can edit *Events* by clicking on the flash icon, choosing the proprietary *Method*, and configuring *Event* logic with the *Flowchart* wire editor.

{% tabs %}
{% tab title="Button\[onClick] Event" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FJuVvBfl6u0Oh4bh8GAgp%2Fimage.png?alt=media\&token=69ff67c4-70f1-4c8c-aa94-b15fafa45777)
{% endtab %}

{% tab title="Flowchart  Editor" %}

<figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FQu4iEzyzTypfeCCUPSSl%2Fimage.png?alt=media&amp;token=8b02404f-ed8c-4a02-80d3-0f0a9797e319" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### 2. Views Events

Each of the existing application *Views* has an option to edit its *Events* on Initialize and when the input parameters are changed — even in editing *Views Events*, configuring *Event* logic with the *Flowchart* wire editor.

{% tabs %}
{% tab title="View Events Settings" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FmX38TX2Ml0ReKqONktJY%2Fimage.png?alt=media\&token=61b153b3-b5d0-4e43-a5d2-a47f5550a16a)
{% endtab %}
{% endtabs %}


# Assets

Assets provide a simple way how to upload project related resources, such as images (logo, background, fav icons) or some static files.

To add a new asset, click Asset in the main menu, select file and click upload. The asset will be uploaded into your project and you can access it anytime.

<figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FlcR5gpFVramtR3N5oYrL%2Fimage.png?alt=media&amp;token=638aa14f-59a4-4c69-87e4-a8887356e11b" alt=""><figcaption></figcaption></figure>

You can also preview the asset in the editor and copy the address of the resource.

<figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FYt7j3g0OZgkSJwg6s0vC%2Fimage.png?alt=media&amp;token=233cb1e3-767c-4a7e-b9b0-b0e794f9bb89" alt=""><figcaption></figcaption></figure>


# Editor

Deliver professional WEB applications 3-5x faster!

The graphics user interface represents the visual output of a whole application, and it's mainly used for designing and connecting existing actions and data structures. The design of applications is composed of canvas drag and drop work-field by many different components placed in views, which are used as standalone pages or as subelements of other views.

![Nonmenclature of Canvas GUI panels](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F2EJ27NVm00k11rNtE8y1%2Fimage.png?alt=media\&token=3f541369-2b6e-4cbf-b250-084da73243e9)

All existing or new elements, like actions, integrations, or views, are placed in a directory structure with the possibility of sorting out files, renaming, moving, or deleting them. If desired, there is also an option to make other sub-directories by choosing it from Create a new menu.

### Canvas GUI Editor <a href="#ckc9vuiv64nj" id="ckc9vuiv64nj"></a>

Canvas graphical user interface editor shows us the content of personal views, with the option for switching between design, preview or debug mode.

### Design Mode <a href="#i3enk7nstw48" id="i3enk7nstw48"></a>

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FEeDO14vF069eqofvJ8h4%2F2?alt=media" alt=""></div>

The Design Mode represents the output layout composed of a single components. You can drag and drop elements, define their parameters, and bond them with existing actions.

![Design Mode](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FlRpdry92ksO033h4ojv6%2F3?alt=media)

### Preview Mode <a href="#u2sseqy7fzx" id="u2sseqy7fzx"></a>

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FjDQHQhdBuPFaY5bfmorh%2F4?alt=media" alt=""></div>

Preview Mode shows views represented by a web browser without deploying them.&#x20;

![Preview Mode](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FYmpPX2qm2TFA1dzxMrFM%2F5?alt=media)

### Debug Mode <a href="#qnmmhp9r20u0" id="qnmmhp9r20u0"></a>

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FEX4CFzoIrYQBm604KgQq%2F6?alt=media" alt=""></div>

The Debug Mode is read-only, showing a complete blueprint traceable case of the actual view.

![Debug Mode](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FEFEa2zuYQcSDtfWc641z%2F7?alt=media)


# Main Menu

The roll-up setting allows configuring the whole application environment, like creating new resources files, editing them, sorting directories, managing access rights, etc.

![The Application Enviroment setting](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FbR9gzfGHjKvUtUSCzdak%2Fimage.png?alt=media\&token=6ce861cd-1e6f-42c5-b8ec-9f455e79e9fc)


# Create New Resources

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FzKSyi88TGoYyIhTMSOQg%2Fimage.png?alt=media&amp;token=8032fc65-e960-4133-a96b-d7098425b43b" alt="Creat a new resource"></div>

Creating a new View, Action, or Integration is easy and intuitive. Simply click on a required element, name it, and associate it with a specific directory.

{% tabs %}
{% tab title="Create New View" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FObmvEJ0MBZ2yQRkixi6C%2Fimage.png?alt=media\&token=2d75326c-890e-4261-a4e6-bfb4c7b82f39)
{% endtab %}

{% tab title="Create New Action" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FMDmz1umUc6SfsIyaOPnR%2Fimage.png?alt=media\&token=07746452-0f58-4533-8b39-e65bf8c4f468)
{% endtab %}

{% tab title="Create New Integration" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FBFP04hloAQVdwdpF3xUU%2Fimage.png?alt=media\&token=305d5800-874a-45af-884c-f8ad5e327ebc)
{% endtab %}
{% endtabs %}

Structuring is essential for the growth of an application. Each existing or new file has its directory location and can be renamed, moved, duplicated, or deleted. If necessary, extending an application of subdirectories makes it possible to create a new one.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FBTXqLJtyK93xK2WLlR7B%2Fimage.png?alt=media&amp;token=e06e8bc8-b02a-45bc-856e-88dc045689e5" alt="Structure of the directories"></div>

Any required files can be opened in the editor by clicking on.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FPGHr38frghVeuT9aWwBS%2Fimage.png?alt=media&amp;token=f3fe0636-d782-44bd-95d0-15ea19c5ef13" alt="Editing of selected files"></div>


# Manage the Application

The application settings open a new platform window if necessary.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F1EVzvBKDYw2WwVgfLmI1%2Fimage.png?alt=media&amp;token=e1087c06-ffbd-4072-bba9-57a79060c850" alt="The Application settings"></div>

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FefUPHeLEoBgbjUXqVdnp%2Fimage.png?alt=media&amp;token=46aa67c4-6ee0-4746-a3bd-79517955250f" alt="Application platform overview"></div>

Editing access rights and permissions allow login to the application by authorized users.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fub0n54j0w9OkRlsdLnid%2Fimage.png?alt=media&amp;token=2ffedc26-7c03-4400-afe5-c671d7577d70" alt="Users &#x26; Permissions settings"></div>

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FzfrUs0f12kAG3g5tIdXK%2Fimage.png?alt=media&amp;token=2cb4646e-8379-4f34-8dd4-96e7809b65eb" alt="Team Members access rights"></div>

Deployments allow checking the actual cloud setting of the application environment.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FgMiUvvtEgALLIAOzhMef%2Fimage.png?alt=media&amp;token=a8f40e4b-3247-4763-a154-e6f19ce6b219" alt="Deployments and enviroments setting"></div>

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F45omxDmp99koDw9ApEYd%2Fimage.png?alt=media&amp;token=f07718dc-a65e-4a93-9c43-c9b245e6ddf9" alt="Deployments setting of the current application"></div>


# Monitoring Errors

{% content-ref url="/pages/srAwRKvVBif9AGSNgle3" %}
[Error Monitor](/getting-started/editor/main-toolbar/error-monitor)
{% endcontent-ref %}


# Main Toolbar

Editor main toolbar allows deploying, running, and previewing the application with the possibility of checking error issues.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FnSeUp5EGZIlvCueqUfVh%2Fimage.png?alt=media&amp;token=5a3211dd-44a6-4ff1-97a0-5f917b114332" alt="Main Toolbar buttons"></div>

![Main Toolbar buttons at the upper right corner](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FfNGtoLGrh5Ko3WHeUOKs%2Fimage.png?alt=media\&token=21b22856-f4c7-448d-8b2b-4fee997165aa)


# Deploying the Application

Deploying the application to a required environment is simply done by selecting the production Name and clicking on the Deploy button. If there are no health issues, the application will be deployed in a short while.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FlFQJk0ZvSnlyRyusznPU%2Fimage.png?alt=media&amp;token=2eea097f-d15d-4d7e-a949-34ea6e08e03a" alt="Deploy button"></div>

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FE42LZt44Ulo5OdCRIq0W%2Fimage.png?alt=media&amp;token=0d2a2bb5-27aa-43f0-bd49-5926fca252fa" alt="Deploying the application to selected environment"></div>


# Opening the Application

Opening the application is possible right after deploying. Authorized users are allowed to log in, provided that the application is not publicly accessible.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F9XeJwetGRBwzYlcEBrCn%2Fimage.png?alt=media&amp;token=5527ad11-d232-45ae-95e3-190fae115cec" alt=""></div>

![Starting the new application](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F4IyaaGyPeES4OmUTMJ10%2Fimage.png?alt=media\&token=365d4eac-1452-4dcf-8b90-3f5d7703552f)


# Preview Mode

A preview of the application is independent of deployment. It's run directly in a browser without the possibility to run it out of the editor. There are two layers of preview modes. First is clicking by eye icon at Main Toolbar;

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F5kDA5QPFV4HpcPAuLprB%2Fimage.png?alt=media\&token=91d5d115-0c97-49c3-90b7-13d751f3adc6)

; the second is switching on the toolbar of the current View.

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FAVnyAOZR23pZelq9G4nW%2Fimage.png?alt=media\&token=f18d574b-a689-405f-8775-1eafb28931f8)

The main difference is switching between the preview of the whole application and the current View.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FVFNUhYCOn3SuJQAoCzZq%2Fimage.png?alt=media&amp;token=219b7659-d069-4eff-aeff-0b99f9a0f01d" alt="The basic example of layout application in preview mode"></div>

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F0nWVqHrdjWdmcqNR7bsb%2Fimage.png?alt=media&amp;token=400e57e2-8bf2-408c-8e30-d41772f00f42" alt="Switching to current View in preview mode"></div>


# Error Monitor

Checking the health of your application is essential to avoid potential errors and mistakes. The monitor separates announcements between errors, warnings, hints, and info.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FxLTr5RVSY19gtPuoPT3V%2Fimage.png?alt=media&amp;token=7c967708-f4a9-4698-be7a-cdc569ef80fb" alt="Main Toolbar"></div>

Switching into the Error monitor view can be done by clicking on the warning icon in the Main toolbar or from the application environment.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FNlp4oTKHl1u8eYpt3HMk%2Fimage.png?alt=media&amp;token=450b0312-8ebf-41d8-8dac-33c05c86899e" alt="Application Environment"></div>

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FR7cpnZVERe0ivhQp6Q3z%2Fimage.png?alt=media&amp;token=04ff3c26-23dc-4d15-8c56-8a56deae2639" alt="List of all errors, warnings, hints and infos"></div>


# Components Panel

The Components Panel allows switching between all available components, configuration inspector, and set of the current view.

![Position of the Components Panel](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FLDjXQmN97tdrRMYp4MkI%2Fimage.png?alt=media\&token=229e9898-c73d-4737-a4f5-3bffd07b3391)

{% tabs %}
{% tab title="Components" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FhnMPjzIVI1cDfLNlPMFF%2Fimage.png?alt=media\&token=51481a32-3808-47d7-9ee1-caefcb96ac36)
{% endtab %}

{% tab title="Inspector" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FnSRvhddZfNNzPFgh57aY%2Fimage.png?alt=media\&token=8b3192e3-d8f3-415c-8f3c-57804413d755)
{% endtab %}

{% tab title="View Setting" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FSpaykDokkIPfdh3t2nOp%2Fimage.png?alt=media\&token=0127af21-f4cf-4190-a5fd-f9ba8c03e505)
{% endtab %}
{% endtabs %}


# Components

The Components are the basic building blocks, primarily representing a visual representation of a whole application. Each component has its properties, set up as constant values or defined from a dynamic source.

{% tabs %}
{% tab title="Components Search" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FrHdRtOmicbsfDRBaTiu3%2Fimage.png?alt=media\&token=32904e5f-5476-4f6f-bf64-378cdc6d59da)
{% endtab %}

{% tab title="Components Groups" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F4kzqneQUBreEDIppk093%2Fimage.png?alt=media\&token=1bd9719b-1e44-4945-ad9a-e6437ae59f6b)
{% endtab %}
{% endtabs %}

Searching filter between components is handy, especially for intermediate users with knowledge of their names. Searching filter between components is handy, especially for intermediate users with knowledge of their names. Switching between components grid display even can save some time.

{% tabs %}
{% tab title="List Name Resolve" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FGKTdvnHg7t7Krx1waWKD%2Fimage.png?alt=media\&token=a3e1003b-960d-482e-a59f-70e8cb12586b)
{% endtab %}

{% tab title="Group Name Resolve" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F9D035Dn8vo8w4MbA6YpS%2Fimage.png?alt=media\&token=e0f62575-afbf-4a0c-9a3c-645c5b16ad93)
{% endtab %}
{% endtabs %}

The active component and parent sorting will appear in the Outline panel right after drag and drop in the canvas work field. The component can be sorted out from that moment, and its properties become editable.

![Drag and drop required component](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FVccsxDmf5lQO3AradPTX%2Fimage.png?alt=media\&token=19988af7-57c8-44bc-bc92-8c88ef758744)

The complete list of available components and their properties are described in the Reference Guide.

{% content-ref url="/pages/MJVRJvSAOrDtymLYCBX9" %}
[Components List](/reference-guide/components-list)
{% endcontent-ref %}


# Inspector

The Inspector allows editing all properties and attributes of the currently selected component. A unique ID name is automatically generated in numeric order, and it's essentially important to rename it to fitting an application purpose. The component itself can even be deleted or triggered by the help button of the referencing guide.

{% tabs %}
{% tab title="Component Type" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FjLeiI3NzHLqwXwkViC6S%2Fimage.png?alt=media\&token=767c6979-27d9-48ea-a43e-b309eec31df0)
{% endtab %}

{% tab title="Unique ID" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FAs2wauEawTJFNhNb69bA%2Fimage.png?alt=media\&token=ec2b8aef-db6b-421b-b84b-c42b7956c563)
{% endtab %}

{% tab title="Delete Button" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FXS7XaG2isLsCG22d1ysF%2Fimage.png?alt=media\&token=de3bd6d8-0778-4cfd-a292-f3bcacf59d75)
{% endtab %}

{% tab title="Reference Guide" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FZD8xRicnSdPtomElT4kX%2Fimage.png?alt=media\&token=4d0c5e23-71e1-49ae-8279-f1f977fe4e9d)
{% endtab %}
{% endtabs %}

Each component has different expandable groups and types of properties, which can be set up as a constant value or bound dynamically by a specific data source. Any wrong syntax will be evaluated as a warning.

{% tabs %}
{% tab title="Shrinked Properties" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FfhCv6xWQXhIXjL30FOzt%2Fimage.png?alt=media\&token=39b07591-de4a-45e2-b1f7-dd4c0655cd25)
{% endtab %}

{% tab title="Expanded Properties" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FxcfmjVPavA7yILA2dnjO%2Fimage.png?alt=media\&token=881a2af0-da7a-4312-a563-d12e7b45ab52)
{% endtab %}

{% tab title="Function Binding" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FvvrIxgWYc9GICFEOvaFu%2Fimage.png?alt=media\&token=71025159-05fb-4529-a97d-93099e7bfdb4)

{% hint style="info" %}
ƒx -> specify the value of the existing *myText* String variable
{% endhint %}
{% endtab %}
{% endtabs %}

A description of all available properties can be found in the Reference Guide.

{% content-ref url="/pages/E1ZVF4zDUp4VgIXsIPdP" %}
[Properties](/reference-guide/properties)
{% endcontent-ref %}

Each component has configurable specific events logic that can be added directly by selecting the desired one from the inspector panel or by clicking by opening the Events Console.

{% tabs %}
{% tab title="Events Panel" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FVOtiPRRdGcXxl4E9K00h%2Fimage.png?alt=media\&token=f84828ae-1d0f-4bee-bc5c-fdf31ef562b2)
{% endtab %}

{% tab title="Direct Logic Selection" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fw9YBxM7xctNi51Gnht6y%2Fimage.png?alt=media\&token=adb603ea-531b-4ec0-a95e-c0672bb39090)
{% endtab %}

{% tab title="Event Console" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F8qugay57TrPrZd5RRZ1Z%2Fimage.png?alt=media\&token=0496620f-f6b4-45e1-a3d3-9ae048235719)
{% endtab %}
{% endtabs %}

Following the Events Referencing Guide to acquire knowledge of how it works.

{% content-ref url="/pages/SdVOY64oLhCSNwW8tXfo" %}
[Events](/getting-started/architecture-overview/events)
{% endcontent-ref %}

If required, it's possible to add internal comments on what brings the advantage of noticing unfinished work or passing information to the team developers.

{% tabs %}
{% tab title="Comment Panel" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FWigKHNTHt0gUfsFxpdmA%2Fimage.png?alt=media\&token=8d76e337-6432-4eec-83b7-2dd03caafc29)
{% endtab %}

{% tab title="Adding New Comment" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FyuHi97khTk2BuTFsgk5W%2Fimage.png?alt=media\&token=00747dd0-f70f-40d1-b514-6c557bc4b9fd)
{% endtab %}

{% tab title="Resolving Comments" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FnIyra4wDcEmyA3c8fiFu%2Fimage.png?alt=media\&token=0ddbe035-5ad5-450a-82c3-f13d5a09ab3a)
{% endtab %}
{% endtabs %}


# View Settings

Any of the implemented Views has its independent settings from each other. Giving it a proper name and description does not affect the visible or logical output and serves just for internal use; for example, it's handy for team-developed applications.

{% tabs %}
{% tab title="Options Settings" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FHvPRdlrdsiXxcPLv0ST7%2Fimage.png?alt=media\&token=c2204a07-bec8-4f4d-834a-f2fe7ee8f329)
{% endtab %}

{% tab title="Title and Description" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FJF6fC3LJ5cvGHCWLchAT%2Fimage.png?alt=media\&token=22912daf-25c5-4b7e-b36f-c510e3d0e964)
{% endtab %}

{% tab title="Code Editor Desription" %}

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FEiM6an9BagP7wR9qKixA%2Fimage.png?alt=media&amp;token=cfb88ed2-e629-40b9-8f9d-63849f2639e3" alt=""></div>
{% endtab %}
{% endtabs %}

The required authenticated user verifies if the current user ID is not a null value, preventing access of the View to non-authorized persons. Binding access rights with specific condition rules expand accessibility options; in our case, an already logged user has to have a specified Name.

{% tabs %}
{% tab title="Require Authenticated User" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FhGyAwK5iNKVFDjVLuIR8%2Fimage.png?alt=media\&token=862bb506-0f72-4d5f-a39d-422ebdc1d88a)
{% endtab %}

{% tab title="Authorization Condition" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FuimZF1pnVAQUUmGKjMZ5%2Fimage.png?alt=media\&token=511164e8-1150-41a3-96b2-8af1a092b1e7)
{% endtab %}

{% tab title="Code Editor Description" %}

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FHgcvspxn27sbtzL7TRmh%2Fimage.png?alt=media&amp;token=72ae2219-3500-4205-9451-5ef688c06db8" alt=""></div>

```
IF(currentUser.firstName == "Martin", true, false)
```

{% endtab %}
{% endtabs %}

If any of the input parameters are changed, reinitializing the output of a View is triggered.

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FpqHYFqjxkW4OFUMZ7V0U%2Fimage.png?alt=media\&token=bc7e75d7-48af-4793-9247-d9f4adfb6677)

Setting up the virtual URL address of the current View is handy with the logical route component, where instead of its ID targeting nomenclature.

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FIRwGkElLuKwileNgqitG%2Fimage.png?alt=media\&token=92c99b02-f491-4239-b875-7c555191a7b2)

Two different Events methods are triggered by initialization or when the input parameters are changed. Both of the methods are not dependent on each other. Events logic can be added directly by selecting the desired one from the Events panel or clicking on the required action.

{% tabs %}
{% tab title="Events Settings" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FI2nNrDi3F7xMcJJZOEbs%2Fimage.png?alt=media\&token=4ceb3be0-9827-42e6-824e-ab87ad1ca221)
{% endtab %}

{% tab title="Direct Logic Selection" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fkez5osCkgZhPhHnf2ToN%2Fimage.png?alt=media\&token=3d3f99f7-f86c-443c-8951-547cb0568c58)
{% endtab %}

{% tab title="Event Console" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FgdBCMvgj18TDCjOaOVK5%2Fimage.png?alt=media\&token=69a0daab-3eb9-476c-9d8e-338255e5db27)
{% endtab %}
{% endtabs %}


# Outline Panel

Outline panel showing list of active components, bound actions, and variables, superior to the current View.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FS4BD9rTPcLIqkKPSOJ1e%2Fimage.png?alt=media&amp;token=f6e36268-f53b-4dfc-8a6e-6bc0d59a7bf2" alt="Outline Panel of the current View"></div>

Except for components, adding new data or variables can be done by clicking on the plus button and choosing the required one.

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fe2slMP1P8VwXlzjgVUqP%2Fimage.png?alt=media\&token=5cbbea91-79fc-4c2f-89d6-09cc7642221a)


# Data Variables

A Datasource bound with the current View is separated into state variables, and variables returned by a specific action. Adding the new variable can be done by simply clicking on the plus button and choosing the required one.

{% tabs %}
{% tab title="Adding New Datasource" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FIcrGpAwtg9mFAGrltfB3%2Fimage.png?alt=media\&token=adfc84c7-6dc1-4efb-90f9-5344c69cd269)
{% endtab %}

{% tab title="Action Data" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fy0BTYmxsphUWiEmeT0SE%2Fimage.png?alt=media\&token=739fa2b0-6cab-4baf-b83a-8e1e945e4481)
{% endtab %}

{% tab title="State Variable" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fo5azG9uF6V5GmyMH3jpp%2Fimage.png?alt=media\&token=b63e4182-e0a4-4275-a68b-9edc1883efd7)
{% endtab %}
{% endtabs %}


# State Variable

Any View can contain as many state variables as required, and its value can be set up as a constant or bound dynamically. State variables are not accessible between other Views; this means that every View can contain the same-named variables serving a different purpose.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fot0fctTQERe9DKM6pB0E%2Fimage.png?alt=media&amp;token=8e6130c5-64b3-4c50-a899-cffc8d8b8966" alt="Different State variables"></div>

Each of the variables has a unique ID, value, and type. Selecting the desired variable allows one to set up attributes in the Inspector panel. There is also an option to delete the current variable.

{% tabs %}
{% tab title="Inspector Option" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FY8YDCCWK7p0aW2zDzINY%2Fimage.png?alt=media\&token=2064b990-ec22-4567-915b-1d237bcebf29)
{% endtab %}

{% tab title="Variable ID" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FjDBLqIVi4Rumaa3g3Nmd%2Fimage.png?alt=media\&token=d33513a9-b309-4296-ba0b-fb845bbacd81)
{% endtab %}

{% tab title="Options Settings" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FnnBKKvzzLEglaceLIyEa%2Fimage.png?alt=media\&token=5e2f0942-195b-46cf-af67-865650f4e1de)
{% endtab %}

{% tab title="Delete Variable" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FMOsYDtRHEc7qb3ZV6gMP%2Fimage.png?alt=media\&token=b48f3904-ff8f-438e-bce8-f837d9349897)
{% endtab %}
{% endtabs %}

Value types of state variables are dependent on their usage. The most common String value is set up as a default, but options for Number, Boolean, Password, Map, and Array are also set up. Value-type can be changed by clicking on the proper icon.

{% tabs %}
{% tab title="String" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FvsUfPzHjkdu9io8fBuHg%2Fimage.png?alt=media\&token=da345930-c17d-42f4-ba34-8cd177e120fd)

*`ƒx: "Hello World"`*

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FGGMdf7rv1w7QL3GngB7F%2Fimage.png?alt=media\&token=89b2dd98-1b5d-4130-816a-2e4cc185f6a0)
{% endtab %}

{% tab title="Number" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F0QfgBnDObnha5PrJjDIE%2Fimage.png?alt=media\&token=d1efd8d6-4bd5-4dee-8910-2d5a9155eb20)

*`ƒx: 123`*

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FWNZpHRSLMSPUudltZjGd%2Fimage.png?alt=media\&token=c4b7978f-9e96-4ccf-844f-475bfa286b96)
{% endtab %}

{% tab title="Boolean" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F3ZTZvxGP8XJurHSVOZTL%2Fimage.png?alt=media\&token=ab3d9944-5221-4d50-95a7-e3c42816b003)

*`ƒx: true`*

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FVPDNIiPbgCXeAC4HEO73%2Fimage.png?alt=media\&token=59b66dfd-98ff-4f5f-b967-6036123d322a)
{% endtab %}

{% tab title="Password" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fv7mXRNwWGo7siLvkXlhM%2Fimage.png?alt=media\&token=a185ade7-c2e2-4a63-a28a-57711fa8dfd0)

*ƒx: `"TopSecret123"`*

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FMUAMseWGG9RCOsa2bcXM%2Fimage.png?alt=media\&token=e3bf1972-00b5-41ee-b628-411f8d27fe2e)
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Adding Map Items" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FhR9SqJz5gdjUQuh2XBRF%2Fimage.png?alt=media\&token=74d5d6ef-6db0-4d7c-980f-5acc3480b2e6)

*ƒx: {first: "value1", second: "value2"}*

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FU6w0nM25pj014GnsH03G%2Fimage.png?alt=media\&token=f7d2d0af-4eec-486a-9f73-7489519f7486)
{% endtab %}

{% tab title="Editing Items Values" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F8iEtluJSImG8PqDYRDEp%2Fimage.png?alt=media\&token=d8578393-5b1f-4dc8-b439-8dbefcefc905)
{% endtab %}

{% tab title="Deleting Map Items" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F4ZFwYQrZGynwSdOrHxzq%2Fimage.png?alt=media\&token=2c9b8bd2-d399-4985-9c9f-898815420a48)
{% endtab %}

{% tab title="Define Items Valuetypes" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FzIWa9F84D8dTp3NDST3Q%2Fimage.png?alt=media\&token=410d93fa-83bb-4502-a103-4b82efcefe7b)
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Adding Array Items" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FEQrwxadxhZOQePjndK7c%2Fimage.png?alt=media\&token=6e8a7e00-a32f-4ec1-b91f-9f04ee82a87f)

*ƒx: \["value1", "value2"]*

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FZf2DVkHF7BmbBBH8UElJ%2Fimage.png?alt=media\&token=e28fcc23-ce3c-4ca4-bcf4-4c5a3753e5fe)
{% endtab %}

{% tab title="Editing Items Values" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FhmRgon2U33Zv3kCbilaQ%2Fimage.png?alt=media\&token=2b40d100-f17a-4677-b9be-f1b4c8356632)
{% endtab %}

{% tab title="Deleting Array Items" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FMyrNgmjwhqKNa314OPlt%2Fimage.png?alt=media\&token=2d530cd0-74e2-48c1-a607-d1be67e6f161)
{% endtab %}

{% tab title="Define Items Valuetype" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FkEoqnJkwiQOCBbiItIRe%2Fimage.png?alt=media\&token=45ec5be0-039a-4608-89c9-11540c89f8b1)
{% endtab %}
{% endtabs %}

All existing state variables and their values are visible in Data explorer. Any changes in names or values are immediately reflected.

{% tabs %}
{% tab title="String State Variable" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F4YNBvqbZ6SwzEViCLFGP%2Fimage.png?alt=media\&token=3078a5fa-c6af-4692-ba7c-02136b9f9086)
{% endtab %}

{% tab title="Data Explorer State Variable" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FD50sbDhiiDAz8oFiQaLP%2Fimage.png?alt=media\&token=6398fc1d-a1c4-49e9-8bbb-ad6c42cf0f1b)
{% endtab %}
{% endtabs %}

Referencing variable values have to always correspond with Data explorer annotations.

```
variable1.value
```

Even updating a state of the variable by calling the proper function has to hold the correct syntax.

{% tabs %}
{% tab title="Updating State by Event" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FijHfAJM8aPsRLI4H3XZj%2Fimage.png?alt=media\&token=dd3a56bc-b8fa-4a36-b72b-ff8799aced35)
{% endtab %}

{% tab title="Update State Configuration" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FzqbMbVu34XLDsta3laeb%2Fimage.png?alt=media\&token=e50f39f4-b0d3-43bf-9c71-90b4f432f7c6)
{% endtab %}
{% endtabs %}

State variables can refer to each other.

{% tabs %}
{% tab title="Referencing To Logged User" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FgGaAepSkBy79TMsIySb1%2Fimage.png?alt=media\&token=7cb6647b-be54-4ba4-a2d3-0c09cab522c9)
{% endtab %}

{% tab title="Associating Variable To Component" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FZoubjyAjDSUvz4xw21kF%2Fimage.png?alt=media\&token=a991075b-1129-4ca8-b072-6dd730708f9a)
{% endtab %}

{% tab title="Output" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FiMJKi9yRrPsBr5n2rDuz%2Fimage.png?alt=media\&token=a96807ce-4003-4d4e-9c6f-25307ef912e9)
{% endtab %}
{% endtabs %}


# Data From Action

{% hint style="info" %}
Under construction
{% endhint %}


# Data Explorer

Data Explorer is showing a statement of all existing components, variables, and actions allowing to reference correct annotations and functions.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F0JMPtUVX9cjqSIhypDQR%2Fimage.png?alt=media&amp;token=1c1b4add-93f6-465f-999d-61f23845d93e" alt="Data Explorer panel"></div>

Referencing values have always kept the structure of nested elements.

{% tabs %}
{% tab title="Referencing Values" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FDXF4uqx35lLAUSAhGysm%2Fimage.png?alt=media\&token=8d2f2834-ce70-4971-ab01-ead9d13f2b87)

```
task.data.name
```

{% endtab %}

{% tab title="Associating Component Value" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F2t31BmjdwiFGrr5fDl11%2Fimage.png?alt=media\&token=dc0bf28c-9b27-43fe-b871-fbf73c256ea0)
{% endtab %}

{% tab title="Output" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FrXtNaJsk6luhGDVBkmBG%2Fimage.png?alt=media\&token=da65518f-71fe-4cf1-9e0e-2a5c3e1c6859)
{% endtab %}
{% endtabs %}

Any associated function of a current component is marked and can be called by updating the state of a required event.

{% tabs %}
{% tab title="Referencing Functions" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FKhOTSHu9uzdAXjlwk1iT%2Fimage.png?alt=media\&token=b792cee0-92a0-49e0-88c8-d98a08f233b4)
{% endtab %}

{% tab title="Update State Event" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FT2V38n8acVPPJpSNmVpq%2Fimage.png?alt=media\&token=1398d8d7-496f-42b0-b6c1-9b51d8129629)
{% endtab %}

{% tab title="State Event Set Up" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fqg2xEwGSpiO5g2VQXWWI%2Fimage.png?alt=media\&token=c4e5bacb-8ae8-4bb5-8fe2-518972dcea79)
{% endtab %}
{% endtabs %}


# Console

The console shows the complete statement of the current application, mostly referencing health issues.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FKsyr6BioLsbBBQP2ycAj%2Fimage.png?alt=media&amp;token=b20d07fd-27b1-4861-87d8-1492ae260685" alt="Console panel of the current application"></div>

{% content-ref url="/pages/srAwRKvVBif9AGSNgle3" %}
[Error Monitor](/getting-started/editor/main-toolbar/error-monitor)
{% endcontent-ref %}


# Playground

Try free playground and explore Adapptio now!

A fully interactive playground will help you to learn the basics of the Adapptio Editor without any registration. It lives only in your browser and so no data will be persisted.&#x20;

Anytime you are ready to build a real full-featured app just click on the “Build Real App” button in the top right corner.

{% embed url="<https://playground.adapptio.app>" %}


# Best Practices

## Project Structure

Create assets, views, actions and integrations in the proper folder. It helps you to orient in your project.

{% hint style="info" %}
To reuse the same content, create a View and embed it as a widget using View component.
{% endhint %}

## Resource Naming

We recomend to use PascalCase style with dots.

**Integration** - name it as `type.description`.

Examples:

```
Api.MyBackend
Db.MyDatabase
```

**Action** - start with a verb describing purpose of the action.

Examples:

```
GetUsers
InsertArticle
```

**View** - name should represent a page content.

Examples:

```
Users
AddArticle
```

## Variable Naming

Use noun related to the data that the variable contains. We recommend to use camelCase style.

Examples:

```
users         (calling action GetUsers)
buttonState   (represents on / off state)
```

## Component Naming

We recommend to start each name of any component with three abbreviation letter and continue with component description with camelCase style:

* container - cnt
* box - box
* sidebar - sdb
* app header - hdr
* advanced table - adt
* data table - dtb
* pagination - pgn
* text - txt
* label - lbl
* icon - icn
* image - img
* all fields - fld
* button - btn
* menu button - mnb
* property item - pri
* repeat - rpt
* routes - rts
* one of - onf
* qr code - qrc
* composed chart - cmc
* view - view


# Tutorials

Step by step tutorials


# 1. Hello World

How to build an application based on blueprint driven development and reactive programming?

### The Goal

Prepare a basic responsive application, reflecting *Input Field* value into two *Text components*, where one should be a *String* and the second one a *Function*.

![The Hello World Application](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FixgcjFxH4s6BVRDqa2Z1%2Fimage.png?alt=media\&token=0e8eb8bb-92c6-460d-bae1-78a4f892fabe)

### The Description

Any changes you will make to any existing *Components* are fully responsive. In our case, we are placing one *Text Input* and two *Text components* into the *Canvas work-field*. First, the *Text* output would be bound as a `constant Value`; the second one would be mapped `dynamically` by a *Function*.

### The Knowledge You Will Get

1. Responsive notion.
2. Working with *Components* and their properties.
3. Understand the difference between *Constant* and *Dynamic Values*.

### The Project Structure

{% tabs %}
{% tab title="View\[MainView]" %}
MainView

* [ ] Container\[cntHelloWorld]
  * [ ] Text Input\[fldInpName]
  * [ ] Text\[txtString]
  * [ ] Text\[txtFunction]
    {% endtab %}
    {% endtabs %}

### 1. Prepare your MainView Canvas

The `MainView` is an inseparable part of all applications and is superior to any other *Views*. You can put components directly to the `MainView` *Canvas* or start by creating a new one.

{% hint style="info" %}
Keep in mind that the application is always run from the `MainView`. Mean, if you use another one, you won't see any results after deployment till you will bind `MainView` with a *View component*.
{% endhint %}

Let's say that we will stay in `MainView` for this tutorial.

1. Find a **Container** and drag and drop it to your `MainView` *Canvas* from the *Component Panel*.
2. Rename its *ID* to `cntHelloWorld` at the *Inspector Panel*. You can also see the `name` change in the *Outline Panel* at that tim&#x65;*.*
   1. Set up *Common* -> *Flow* on `Under each other`, telling us sorting of child components.
   2. *Common* -> *Horizontal Alignment* -> `Center` and *Vertical Alignment* -> `Middle` ensuring position of all placed components right in the middle.
   3. *Style* -> *Spacing* -> `Medium` is set up distance between all child components.
   4. The last setting of the `cntHelloWorld` *Container* has to be *Layout* -> *Item Flex* -> `Stretch` filling full content *View*.

{% tabs %}
{% tab title="Canvas\[MainView]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FgBoStf3lnEbbzjXekGl3%2Fimage.png?alt=media\&token=4a6f03f7-e88e-446c-adf4-102409efa501)
{% endtab %}

{% tab title="Outline\[MainView]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FEmjvKdWIKixb8FMq2Mr3%2Fimage.png?alt=media\&token=8473d94c-659e-413a-aacc-b9a01fc7fb4f)
{% endtab %}

{% tab title="Inspector\[Common]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FMa7IROxEDpZ6TAjFtbwx%2Fimage.png?alt=media\&token=a72b6844-0577-45bc-9c4e-16b48a984370)
{% endtab %}

{% tab title="Inspector\[Style]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FhcSJhIqqCavvrYBbfaCb%2Fimage.png?alt=media\&token=f3bf94f4-0c8d-441f-bab8-d249619d926e)
{% endtab %}

{% tab title="Inspector\[Layout]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FwdjlbVpnrnralN2VpNh6%2Fimage.png?alt=media\&token=b9116553-5ad0-481c-b7b9-a720b6e5e97d)
{% endtab %}
{% endtabs %}

### 2. Placing Components into Container

Place three components into `cntHelloWorld` *Container* and set up their properties.

1. First, put into `cntHelloWorld` **Text Input** from *Component Panel* and set up its *ID* -> `fldInpName` following next properties:
   1. *Common* -> *Value* -> "`...`" showing content of `fldInpName` by a *Default*.
   2. *Common* -> *Placeholder* -> "`Input your name`" ensure hint of the *Text Input* unless its empty *Value*; for example, if you will delete "`...`" when the application will run.
   3. *Layout* -> *Width* -> `200px` forcing to keep the pixel width of the *Text Input*.
2. The Next component would be a **Text** that *ID* set up on `txtString`. Keep the *Value* empty for a moment and continue with other properties:
   1. *Common* -> *Text Style* -> `Bold` and *Font Size* -> `Large` defines graphical output style of `txtString`.
3. The Last component would be a Text also with *ID* -> `txtFunction`. Even here keep Value blanc and set up as follows:
   1. *Common* -> *Text Style* -> `Bold`; *Font Size* -> `Large`; *Foreground* -> `RED` what represents graphical output of `txtString`.

{% tabs %}
{% tab title="Canvas\[cntHelloWorld]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FV5OVcF5PNM4rss42RBd7%2Fimage.png?alt=media\&token=b0025860-0f49-4acc-92f2-dcfed0e31a9c)
{% endtab %}

{% tab title="Outline\[MainView]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FEdeylLSo49xur81QyU1j%2Fimage.png?alt=media\&token=2c1ce9c1-5955-4fde-b747-30dc20932632)
{% endtab %}
{% endtabs %}

### 3. Bind Components Together

Both *Text Components* have to assume the *Value* of the *Text Input*. We can make it in two ways; first, *Text Input* will stay as a *constant Value*; the second one will be switched to a *Function*.

{% hint style="info" %}
Any associable *Values* and callable *Functions* of the existing *Components* can be referenced by matching the structure in the *Data Explorer*.
{% endhint %}

1. Set up `txtString` *Common* -> *Value* -> `Hello, ${fldInpName.value}`
2. Switch on *Function* of `txtFunction` by clicking on *ƒx* icon on the right side of the *Value property*.
3. Set up `txtFunction` *Common* -> *Value* -> `"Hello, " + fldInpName.value`&#x20;

{% hint style="info" %}
You will see "Hello, ..." *Text output* at both *Text Components* if you did it righ&#x74;*.*
{% endhint %}

{% tabs %}
{% tab title="Canvas\[Main View]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FbmqpZ1ygEJODp5nWiQQU%2Fimage.png?alt=media\&token=e57845fa-ab27-4393-a9c6-fdb96294f619)
{% endtab %}

{% tab title="Code Editor\[txtString Value]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FZu04b2ttaIedsNpRN1zh%2Fimage.png?alt=media\&token=5d741a61-e90c-4af9-936c-56165b73aab0)
{% endtab %}

{% tab title="Code Editor\[txtFunction Value]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FSrTYekatEzEWXg2gW20q%2Fimage.png?alt=media\&token=4f77495b-c1ce-47a0-bbeb-fd6376d1910c)
{% endtab %}
{% endtabs %}

### The Conclusion

The *constant Value* and *Dynamic Function* are interconnected, and both settings are valid. Referencing *Function* from *String* has to be annotated by `${function}`; meanwhile, referencing *String* from *Function* has `“string”` annotation.


# 2. Visualize Data from API

How to easily display data from REST API backend?

### The Goal

Prepare a basic *Customer Search* application connecting data using *REST API* *Integration*.

![REST API Application](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FeTNR1X4ibukxtb6qGXpL%2Fimage.png?alt=media\&token=bf527c06-6ea0-4a0c-a4a2-d4c0cf5059fc)

### The Description

Typical usage of the *REST API Integration* can be loading data from a JSON server, in our case, *Mock API*. We will connect to customer data which content would be a part of the *Advanced Table* filtered by a dynamic search field. Additionally, each *Table record* has its icon triggering the e-mail client.

### The Knowledge You Will Get

1. How to use the REST API Integration.
2. Working with an Advanced Table.
3. Triggering an E-mail client.

### The Project Structure

{% tabs %}
{% tab title="View\[MainView]" %}

* [ ] Data from Action\[`customers`]

* [ ] View\[`MainView`]
  * [ ] Container\[`cntRoot`]
    * [ ] Label\[`heading`]
    * [ ] Text Input\[`fldSearch`]
    * [ ] Advanced Table\[`tblCustomers`]
      * [ ] Column1
        * [ ] Text\[`txtFirstName`]
      * [ ] Column2
        * [ ] Text\[`txtLastName`]
      * [ ] Column3
        * [ ] Text\[`txtEmail`]
      * [ ] Column4
        * [ ] Text\[`txtCompany`]
      * [ ] Column5
        * [ ] Button\[`btnSendEmail`]
          {% endtab %}

{% tab title="Action" %}

* [ ] `GetCustomers`
  {% endtab %}

{% tab title="Integration" %}

* [ ] `MyRestApi`
  {% endtab %}
  {% endtabs %}

### 1. Prepare a Basic Layout

As usual, let's start with a *Layout* preparation. The *Main Container* will contain a *Header*, *Search Field*, and *Advanced Table*.

1. Place in `MainView` a **Container**, name its *ID* -> `cntRoot`, and configure it as follows:
   1. *Flow* -> `Under each Other`; *Horizontal Alignment* -> `Stretch`; *Padding* -> `X-Wide`; *Spacing* -> `Medium`;
2. As a *Header*, we will simply use a **Label** with the *ID* -> `heading`.
   1. Set up `heading` properties: *Value* -> "`Customers`"; *Font Size* -> `XLARGE`;
   2. *Icon* -> *Name* -> "`mdi/briefcase-account`"; *Size* -> `Large`; *Flow* -> `Icon left`
   3. *Style* -> *Horizontal Alignment* -> `Left`; *Vertical Alignment* -> `Middle`
3. Put in a **Text Input** component, serving as *Search Field*. Name its *ID* -> `fldSearch`, and it's *Placeholder* -> "`Search...`"
4. The last component will be an **Advanced Table** carrying *ID* -> `tblCustomers`; *Spacing* -> `Medium`;
   1. Add *five Columns* and simply name them as follows: `First Name`; `Last Name`; `Email`; `Company`; `#5`
   2. Set up *Column* `#5` *Width* -> `36px`
   3. Place to each of the *Columns* the following components:
      1. **Text** -> *ID* -> `txtFirstName`
      2. **Text** -> *ID* -> `txtLastName`
      3. **Text** -> *ID* -> `txtEmail`
      4. **Text** -> *ID* -> `txtCompany`
      5. **Button** -> *ID* -> `btnSendEmail`; *Value* -> ""; *Icon* -> *Name* -> "`mdi/email-edit`"; *Size* -> `Medium`
         1. *Style* -> *Button Style* -> Custom; *Background* -> `Transparent`; *Foreground* -> `Secondary`; *Border Color* -> `LIGHT_GRAY`; *Border Width* -> `1px`
         2. *Custom hover state* -> *Background* -> `Transparent`; *Foreground* -> `PRIMARY`; *Border Color* -> `PRIMARY`

{% tabs %}
{% tab title="Canvas\[MainView]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FqoNskfmPSAk90K2eyMWx%2Fimage.png?alt=media\&token=b54a9a09-58e4-423d-8723-a46748c0b956)
{% endtab %}

{% tab title="Current Components" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F0LXzJe7FncxYLMBExHCo%2Fimage.png?alt=media\&token=e4d1d060-fcda-4cc3-9f8e-24a5e695aee7)
{% endtab %}
{% endtabs %}

### 2. Connect the Rest API Integration

Don't hesitate to use our *JSON Server* or use your own. The *Base URL* of the *Server configuration* has to exclude the customer data subdirectory, which would be targeted further by an *Action*.

{% hint style="info" %}
Keep in mind that targeted data must be in a valid JSON format.
{% endhint %}

```json
[
    {
        "id":0,
        "first_name":"Douglas",
        "last_name":"Brakus",
        "email":"Gutmann_Preston@yahoo.com"
        ,"company":"Effertz and Sons"
    }
]
```

1. Create a new **Rest API Integration**, name it `MyRestApi` and configure as follows:
   1. *Base URL* -> "[`https://mockapi.adapptio.app/2c932729/rest`](https://mockapi.adapptio.app/2c932729/rest)"
   2. *API Timeout* -> `10000`
2. Save it and continue with the next steps.

### 3. Create a `GetCustomers` Action

The `GetCustomers` *Action* provides a bridge between `MyRestApi` *Integration* and *Datasource* bound in the `MainView`, which we will configure in the upcoming step. Input search parameter equals *GET Query String*.

{% hint style="info" %}
If additional *Query parameters* are required, it has to be solved on the side of the input parameter.
{% endhint %}

```
// Example: $QueryParam + "?limit=5"
```

1. Create a **Action** and name it `GetCustomers`.
2. Add a **Parameter** with *ID* -> `search`; *String*
3. *On Start* ->Place a **REST API / Request** from *Functions / Integrations Panel* and configure it as follows:
   1. *ID* -> `apiReq`; *Parameters URL* -> "`/customers`"
   2. Add a new *Query*, name it `q` and set up its Value as *ƒx Function* -> `params.search`
4. Wire together a new **Output** and set up its *Return value* -> `apiReq.data`

{% tabs %}
{% tab title="Flow Canvas\[GetCustomers]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FATDxPAdGA5iPXKXBSrr3%2Fimage.png?alt=media\&token=2f56c10f-31ea-4bc2-82f1-1e231d9af6bd)
{% endtab %}

{% tab title="GetCustomers\[REST API / Request]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fi2oyfBSMs5TzwGShrLoV%2Fimage.png?alt=media\&token=ca055f2e-935c-4cc0-bc23-b787d98a0f21)
{% endtab %}

{% tab title="REST API / Request\[q]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FnEP1E9JVifr3bJcZiBdQ%2Fimage.png?alt=media\&token=95092a69-70ca-4133-a863-d8e0d2b2e501)
{% endtab %}
{% endtabs %}

### 4. Bind the `GetCustomer` Action with `customers` Datasource

Somehow we have to bind our *REST API data* with *MainView*. We have to *Add Data from Action* in *Outline Panel* for such a reason.

1. Click on **Add Data from Action** and name it `customers`
2. Select by clicking on *Action Name* -> `GetCustomers`
3. Bind *Search field Value* with *Input parameter* by *ƒx Function* on *search* -> `fldSearch.value`

{% tabs %}
{% tab title="Outline Panel\[Main View]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FZuwHIAvgIjjvbr0NMTYv%2Fimage.png?alt=media\&token=fa4c04fa-8def-4913-bd09-3aaf963fd8ea)
{% endtab %}

{% tab title="customers\[Properties]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FDnPgQAl43mUje08Wdydh%2Fimage.png?alt=media\&token=863cd9c7-e34d-4a8a-bafd-72f129e1b616)
{% endtab %}
{% endtabs %}

### 5. Associate `customers` Datasource with `tblCustomers` Table

Associating `customers` *Datasource* with our *Advanced Table* items is the last step in making our application live.

{% hint style="info" %}
Watch the difference between annotation in binding `items` *Datasource* and *Values* of included components, where its *Value* is `item`.
{% endhint %}

1. Switch on `tblCustomers` *Properties* and edit *Items* -> `customers.data` (*ƒx)*
2. Associate all *Columns components*, except Button, with the following *Functions*:
   1. `txtFirstName` -> *Value* -> `item.first_name` (*ƒx)*
   2. `txtLastName` -> *Value* -> `item.last_name` (*ƒx)*
   3. `txtEmail` -> *Value* -> `item.email` (*ƒx)*
   4. `txtCompany` -> *Value* -> `item.company` (*ƒx)*

{% tabs %}
{% tab title="tblCustomers\[Items]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FjVGDuVgtMhtoI0xDnTlr%2Fimage.png?alt=media\&token=9d29748b-05a0-4ffb-8faf-e08e1297d7b4)
{% endtab %}

{% tab title="txtFirstName\[Value ƒx]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FYgwLdzluwyUWnJ7oZglW%2Fimage.png?alt=media\&token=2e052ad3-01a6-4ed4-ab05-ae0185230cae)
{% endtab %}
{% endtabs %}

### 6. Add on Click Event to Send Email

The last step in our application process is to associate an *Event* on *Click* `btnSendEmail` *Button*.

1. Switch on `btnSendEmail` and create a new **Event** by clicking on *Click* in *Inspector Panel*.
2. *On Event* -> Add a **Navigate** *function*, wire it together and set it up as follows:
   1. *Options* -> *Link Type* -> `URL`; *URL Address* -> `mailto:${item.email}`

{% tabs %}
{% tab title="Canvas Event\[btnSendEmail\[Click]]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FPe4XteyJXKMBTtry5gkc%2Fimage.png?alt=media\&token=a5ba2fb0-9aa7-4fc0-af51-4a09f3260c8a)
{% endtab %}

{% tab title="btnSendEmail\[Navigate]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FEDawZHQqP7yQprIwIWZk%2Fimage.png?alt=media\&token=9c9e5ed0-60fb-4a3b-9b0b-253564dea947)
{% endtab %}
{% endtabs %}

### The Conclusion

*REST API* belongs with *Databases* in one of the most used Integrations in the Adapptio. Try to bind another free online *JSON Servers*.


# 3. Advanced Layout Application

How to create an application with advanced professional layout?

### The Goal

Compose an *Advanced Layout* application switching between different *Views* by the *Routes*.

![Advanced Layout Application](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F6yZEoSxgxPyquREi4uEQ%2Fimage.png?alt=media\&token=727557b2-89a7-449f-a243-ee7ece473598)

### The Description

The principle of the *Route* component is in switching between the exact URL addresses based on the unique *Views IDs*. Component option settings change any matched route, including the exact home page, specific Views, or non-existing addresses.

{% hint style="info" %}
Be noticed that the application URL address is always in the following format: `ApplicationURL/view/view_id`
{% endhint %}

All *Defined Routes* are matched from top to bottom, which means it's essential to prepare *Routes* heading from the home page, followed by specific *View IDs*, ending with the non-existing content.

{% hint style="info" %}

1. `home` -> `exact ApplicationURL`
2. `view` -> `ApplicationURL/view/view_id`
3. `home` -> `non-exact ApplicationURL`
   {% endhint %}

### The Knowledge I Will Get

1. Switching between Views using the Routes.
2. Referencing dynamic values from Data Explorer.
3. How to Logout the application.

### The Project Structure

{% tabs %}
{% tab title="View\[MainView]" %}

* [ ] MainView
  * [ ] Application Header\[hdrMain]
    * [ ] Text\[txtAppName]
    * [ ] Menu Button\[mnbMain]
  * [ ] Sidebar Layout\[sdbMain]
    * [ ] Content(content)
      * [ ] Routes\[rtsMain]
        * [ ] Option #1
          * [ ] View\[viewHome]
        * [ ] Option #2
          * [ ] View\[viewDynamic]
        * [ ] Option #3
          * [ ] Container\[cntNotFound]
            * [ ] Label\[lblNotFound]
    * [ ] Content(sidebar)
      * [ ] Box\[boxBackground]
        * [ ] Navigation Tree\[trnNavigation]
          {% endtab %}

{% tab title="View\[ViewA]" %}

* [ ] ViewA
  * [ ] Container\[cntRoot]
    * [ ] Label\[lblTitle]
      {% endtab %}

{% tab title="View\[ViewB]" %}

* [ ] ViewB
  * [ ] Container\[cntRoot]
    * [ ] Label\[lblTitle]
      {% endtab %}

{% tab title="View\[ViewHome]" %}

* [ ] ViewHome
  * [ ] Container\[cntRoot]
    * [ ] Label\[lblTitle]
      {% endtab %}

{% tab title="View\[ViewProfil]" %}

* [ ] ViewProfil
  * [ ] Container\[cntRoot]
    * [ ] Label\[lblTitle]
      {% endtab %}
      {% endtabs %}

### 1. Prepare a Sub-Pages

First, let's prepare four sub-*Views* serving as basic elements of the `MainView`. Its structure would be the same, just with different content.

1. Structure of all sub-*Views*:
   1. Place in a **Container** named *ID* -> `cntRoot`; *Padding* -> `Wide`; *Spacing* -> `Medium`; *Item Flex* -> `Stretch`
      1. Into the `cntRoot` put a **Label** with *ID* -> `lblTitle`; *Text Style* -> `Bold`; *Font Size* -> `MEDIUM`; *Icon Size* -> `Medium`
2. Create the following **Views** and upgrade their Properties:
   1. *ID* -> `ViewA`; `lblTitle` -> *Value* -> "`ViewA`"; *Icon Name* -> "`mdi/alpha-a-circle`"
   2. *ID* -> `ViewB`; `lblTitle` -> *Value* -> "`ViewB`"; *Icon Name* -> "`mdi/alpha-b-circle`"
   3. *ID* -> `ViewHome`; `lblTitle` -> *Value* -> "`Home`"; *Icon Name* -> "`mdi/home`"
   4. *ID* -> `ViewProfil`; `lblTitle` -> *Value* -> `currentUser.fullName` (*ƒx*) ; *Icon Name* -> "`mdi/account-circle`"

{% hint style="info" %}
You can overwatch the whole currentUser structure in the Data Explorer. Be sure, that you will switch *(ƒx) Values* dynamically.
{% endhint %}

{% tabs %}
{% tab title="Main Menu\[Views]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F9BAAacCkW98FJRiSKDmG%2Fimage.png?alt=media\&token=42b2fd24-5577-44ea-bd0a-203b73caee2e)
{% endtab %}
{% endtabs %}

### 2. Prepare `MainView` Header Content

Let's start with a *Header* following a *SideBar* in the next step.

1. Create an **Application Header**, name it `hdrMain`, and set up its properties as follows:
   1. *Height* -> `Medium`; *Horizontal Alignment* -> `Left`; *Padding* -> `10px 20px`; *Spacing* -> `Medium`
   2. Into `hdrMain` Place in a **Text** with *ID* -> `txtAppName`:
      1. *Value* -> `constants.appName` (*ƒx*); Font Size -> `LARGE`; *Foreground* -> `WHITE`; *Item Flex* -> `Stretch`
   3. Into `hdrMain` put also a **Menu Button** with *ID* -> `mnbMain`; *Value* -> `currentUser.email` (*ƒx*) and add *Items*:
      1. `Profile` -> *Value* -> "`Profil`"; *Icon Name* -> "`mdi/account-circle-outline`"
         1. *Link* -> *Link Type* -> `View`; *View* -> Select(`ViewProfil)`; *Link Target* -> `Self`
      2. `Logout` -> *Value* -> "`Logout`"; *Icon Name* -> "`mdi/logout-variant`"
         1. *Link* -> *Link Type* -> `Named Route`; View -> Select(`Logout`)

{% hint style="info" %}
Any *Link Type* has to be`Self`*-targeting* to match the inner *Routes*.
{% endhint %}

{% tabs %}
{% tab title="Canvas\[MainView]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F1oZsApwQKqUVULeQJFxl%2Fimage.png?alt=media\&token=fe85c718-8b0b-4289-8813-68f3a0f6dc4b)
{% endtab %}
{% endtabs %}

### 3. Place in a Sidebar Layout and Its Components

The *Main content* of the *Sidebar* layout will contain a *Route* component; the *Sidebar* itself will include a *Navigation*.&#x20;

1. Put in the `MainView` a **Sidebar** and name it `sdbMain`:
   1. *Main Content* -> *Spacing* -> `Medium`; *Sidebar* -> *Spacing* -> `Medium`; *Width* -> `Medium`; *Item Flex* -> `Stretch`
2. Place into *Content Container* of `sdbMain` a **Routes** *Component*, name it `rtsMain` and *Item Flex* -> `Stretch`; *We will configure Routes in following steps*.
3. Into *Sidebar Content* place a **Box** with *ID* -> `boxBackground`;&#x20;
   1. *Style* -> *Background* -> `WHITE`; *Border Color* -> `#dee6ec`; *Border Width* -> `0px 1px 0px 0px`; *Padding* -> `50px 20px 0px 0px`; *Spacing* -> `Medium`; *Item Flex* -> `Stretch`
4. *Sidebar Box* will carry a **Navigation** *Component* named `trnNavigation`with *Item Flex* -> `Stretch`; *We will configure Navigation in the following steps*

{% tabs %}
{% tab title="Canvas\[MainView]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FmVvZLwDuuKvftqICARbS%2Fimage.png?alt=media\&token=2acde3f4-9bdf-4f5d-8422-c318d5d71e17)
{% endtab %}
{% endtabs %}

### 4. Configuring Routes

*Adding Routes Items* by clicking on the *Plus icon* in the *Inspector Panel* will allow us to define separated *Content Containers*. Switching between *Route Canvas* is done by clicking on the cogwheel on the *Route component*.

1. Add three **Routes**:
   1. *`Home`* -> *Route Name* -> Select(`home`); *Exact* -> `true`
   2. *`View`* -> *Route Name* -> Select(`view`);
   3. *`Home`* -> *Route Name* -> Select(`home`);

{% hint style="info" %}

1. *Exact expression* telling us that `home` has to be matched with a `MainView URL`.
2. Selected `view` option matching *Route* just with `ViewID` parameters.
3. *Non-exact expression* of `home` matching anything else than existing any `ViewID` or `MainView` URLs.
   {% endhint %}

{% tabs %}
{% tab title="Canvas\[Routes\[config]]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F5cadvXnO4Sw2UBHDuZCA%2Fimage.png?alt=media\&token=6c99472d-ffa3-499e-90d2-1211035842df)
{% endtab %}

{% tab title="Outline\[MainView\[Routes]]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fc3THmGTAcEIpogXUhLvA%2Fimage.png?alt=media\&token=f908c1c7-d320-4312-be4e-2ce90feaee02)
{% endtab %}

{% tab title="rtsMain\[Routes]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fcoljf27SBgEfpQGb8xjM%2Fimage.png?alt=media\&token=e508caac-087c-4110-bd32-aebc59ee29b0)
{% endtab %}
{% endtabs %}

### 5. Editing Routes Content

The *Content* of the individual *Options* is dependent on the matching of the URL pattern.

{% hint style="info" %}
Any selected *Content Components* have the `routeParams` attributes passing the last `ViewID` state.
{% endhint %}

1. Switch between *Routes Content* by clicking on *Toggle Options Cogwheel* and add and configure the following Components:
   1. `home` (#1 Option) -> add a **View** name it `viewHome` -> *View* -> Select(`ViewHome`)
   2. `view` (#2 Option) -> add a **View** name it `viewDynamic` -> *View* -> `routeParams.viewId` (ƒx)
   3. `home` (#3 Option) -> add a **Container** with *ID* -> `cntNotFound`; *Horizontal Alignment* -> `Left`; *Style* -> *Padding* -> `100px`; *Spacing* -> `Medium`
      1. Place into `cntNotFound` *Container* a **Label** with *ID* -> `lblNotFound`; *Value* -> "`The page could not be found!`"; Font Size -> `LARGE`; *Icon Name* -> "`mdi/alert-circle-outline`"; *Icon Size* -> `Large`

{% tabs %}
{% tab title="Outline\[rtsMain]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fsvm6mHxmfDRfAZ7UBt2H%2Fimage.png?alt=media\&token=53eeb983-bead-4a06-8ca5-f8064d01ea11)
{% endtab %}

{% tab title="viewDynamic\[Properties]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F8SpVeAT2u4pc4pphXcuj%2Fimage.png?alt=media\&token=a437f060-075c-496b-9a29-3728a0f72963)
{% endtab %}
{% endtabs %}

### 6. Editing Navigation Content

The *Navigation Options* allow clicking on specified *Views*, including `MainView`. It's self-targeting switching Routes in corresponding ViewID.

1. Select the `trnNavigation` *Component* and edit *Items* as follows:
   1. Add an *Item* and name it `Home`; *Label Value* -> "`Home`"; *Icon Name* -> "`mdi/home-outline`"
      1. *Link* -> *Link Type* -> Select(`Named Route`); *Named Route* -> Select(`home`); *Link Target* -> `Self`
   2. Add an *Item* and name it `View A`; *Label Value* -> "`View A`"; *Icon Name* -> "`mdi/alpha-a-circle-outline`"
      1. *Link* -> *Link Type* -> Select(`View`); *View* -> Select(`ViewA`); *Link Target* -> `Self`
   3. Add an *Item* and name it `View B`; *Label Value* -> "`View B`"; *Icon Name* -> "`mdi/alpha-b-circle-outline`"
      1. *Link* -> *Link Type* -> Select(`View`); *View* -> Select(`ViewB`); *Link Target* -> `Self`

{% tabs %}
{% tab title="trnNavigation\[Items]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FDeSOajHgGKSDK6XUr4Th%2Fimage.png?alt=media\&token=3aeb4f9c-acd4-4e8f-bf0d-d1ec06f1dffc)
{% endtab %}
{% endtabs %}

### The Conclusion

In this *Tutorial* we learn how to switch between routes by matching *Exact* or *Non-exact* URL patterns. Its obvious that *Views* have to be self-targeted and can be dynamically change by a `routeParams` *Parameter*. Try to create few new *Views*, give them some content, and add into the *Navigation Panel*.

{% hint style="info" %}
Follow up on our *Navigation & Routing* tutorial <https://youtu.be/odHoEMonSPg>
{% endhint %}


# 4. Application with In-Memory Database

How to create an application connected to a in-memory database?

### The Goal

The basic principle of all database applications is to create, read, update and delete records in persistent data storage. We will prepare an order application based on an advanced table editable through a side-bar panel with in-memory database integration.

![CRUD application](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FBxVaPblMgsc4gnQLkDtu%2Fimage.png?alt=media\&token=91aaa6ee-11d2-43ce-a993-d230f3de1f6a)

### The Description

We will prepare a basic layout following the in-memory database integration serving as a storage for data. Data variables and button events will bind actions for creating, reading, updating, and deleting table records. Creating or editing an order will trigger the sidebar panel checking data validation and the difference between required actions.

### The Knowledge You Will Get

1. Use InMemory Database integration
2. Create actions both for reading and writing data
3. Create a master/detail View
4. Display a View in a sidebar
5. Use events to handle button actions

### The Project Structure

{% tabs %}
{% tab title="View\[MainView]" %}

* [ ] View\[`MainView`]
  * [ ] Data from Action\[`orderList`]
  * [ ] Container\[`cntRoot`]
    * [ ] Container\[`cntHeader`]
      * [ ] Label\[`title`]
      * [ ] Button\[`btnNewOrder`]
    * [ ] Advanced Table\[`orderTable`]
      * [ ] Column1
        * [ ] Text\[`txtDate`]
      * [ ] Column2
        * [ ] Text\[`txtCustomer`]
      * [ ] Column3
        * [ ] Text\[`txtDescription`]
      * [ ] Column4
        * [ ] Text\[`txtAmount`]
      * [ ] Column5
        * [ ] Container\[`cntItemActions`]
          * [ ] Button\[`btnItemEdit`]
          * [ ] Button\[`btnItemDelete`]
            {% endtab %}

{% tab title="View\[OrderForm]" %}

* [ ] View\[`OrderForm`]
  * [ ] Data Variable\[`isFormValid`]
  * [ ] Data from Action\[`orderEntity`]
  * [ ] Container\[`cntRoot`]
    * [ ] Text Input\[`fldCustomer`]
    * [ ] Text Input\[`fldDescription`]
    * [ ] Number\[`fldAmount`]
    * [ ] Date and time\[`fldDate`]
    * [ ] Container\[`cntButtons`]
      * [ ] Button\[`btnSave`]
      * [ ] Button\[`btnCreate`]
      * [ ] Button\[`btnCancel`]
  * [ ] Parameters\[`id`]
    {% endtab %}

{% tab title="Actions" %}

* [ ] Action\[`CreateOrder`]
* [ ] Action\[`DeleteOrder`]
* [ ] Action\[`GetAllOrders`]
* [ ] Action\[`GetOrders`]
* [ ] Action\[`UpdateOrders`]
  {% endtab %}

{% tab title="Integrations" %}

* [ ] inMemory DB\[`OrdersDB`]
  {% endtab %}
  {% endtabs %}

### 1. Create a Basic Layouts

Let's prepare a basic layout structure for the *Main content* and *Overlay sidebar*.

Create the **View**\[`MainView`] showing actual orders with a *Header* containing a **Button** to `Create New Order`

![View\[MainView\]](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FiePecKaA4IfdpJcAaSpN%2Fimage.png?alt=media\&token=94b5f234-b767-4291-b84c-85676eb7d087)

1. **Container** \[`cntRoot`] -> *Flow* -> `Under each other`; *Horizontal Alignment* -> `Stretch`; *Padding* -> `Wide`; *Spacing* -> `Medium`
   1. **Container** \[`cntHeader`] -> *Flow* -> `Into row`; *Horizontal Alignment* -> `Stretch`; *Vertical Alignment* -> `Middle`;
      1. **Label** \[`title`] -> *Value* -> `Orders`; *Font Size* -> `Large`; *Icon Name* -> `mdi/package-variant`; *Icon Size* -> `Large`; *Horizontal Alignment* -> `Left`; *Vertical Alignment* -> `Middle`; *Item Flex* -> `Stretch`
      2. **Button** \[`btnNewOrder`] -> *Value* -> `Create New Order`;
   2. **Advanced Table** \[`orderTable`] -> *Spacing* -> `Medium`;&#x20;
      1. Column \[`Date`] -> *Width* -> `15%`
         1. **Text** \[`txtDate`]
      2. Column \[`Customer`]
         1. **Text** \[`txtCustomer`]
      3. Column \[`Description`]
         1. **Text** \[`txtDescription`]
      4. Column \[`Amount`] -> *Width* -> `10%`
         1. **Text** \[`txtAmount`]
      5. Column \[`#5`] -> *Horizontal Alignment* -> `Right`
         1. **Container** \[`cntItemActions`] -> *Flow* -> `Into row`; *Spacing* -> `Narrow`
            1. **Button** \[`btnItemEdit`] -> *Icon Name* -> `mdi/pencil-outline`; *Size* -> `Medium`; *Button Style* -> `Custom`; *Style Background* -> `LIGHT_GRAY`; *Style Border Radius* -> `100px`
            2. **Button** \[`btnItemDelete`] -> *Icon Name* -> `mdi/trash-can-outline`; *Size* -> `Medium`; *Button Style* -> `Custom`; *Style Background* -> `LIGHT_GRAY`; *Style Border Radius* -> `100px`

The following **View**\[`OrderForm`] serves as the content of an *Overlay sidebar*, containing editable fields of *existing or new orders*.

![OrderForm](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FTgqpM8Bk9XSZAOij84ai%2Fimage.png?alt=media\&token=57dfc978-f14f-4d24-b9d6-6445f1aed818)

1. **Container** \[`cntRoot`] -> *Flow* -> `Under each other`; *Horizontal Alignment* -> `Stretch`; *Role* -> `Form`; *Padding* -> `Narrow`; *Spacing* -> `Medium`
   1. **Text Input** \[`fldCustomer`] -> *Placeholder* -> `John Doe`; *Label Value* -> `Customer`; *Required* -> `true`
   2. **Text Input** \[`fldDescription`] -> *Placeholder* -> `Some Order`; *Label Value* -> `Customer`; *Required* -> `true`
   3. **Number** \[`fldAmount`] -> *Placeholder* -> `Amount`; *Label Value* -> `Amount $`; *Required* -> `true`
   4. **Date and time** \[`fldDate`] -> *Label Value* -> `Date`; *Required* -> `true`
   5. **Container** \[`cntButtons`] -> *Flow* -> `Into row`; *Horizontal Alignment* -> `Right`; *Spacing* -> `Narrow`;
      1. **Button** \[`btnSave`] -> *Value* -> `Save`; *Type Role* -> `Submit`; *Width* -> `90px`;
      2. **Button** \[`btnCreate`] -> *Value* -> `Create`; *Type Role* -> `Submit`; *Width* -> `90px`;
      3. **Button** \[`btnCancel`] -> *Value* -> `Cancel`; *Type Role* -> `None`; *Background* -> `Secondary`; *Width* -> `90px`;

{% tabs %}
{% tab title="View\[MainView]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F0AL1keoFHanFqYMR6LZj%2Fimage.png?alt=media\&token=c5c9f9d1-0cdc-4561-8471-636a8cee33e4)
{% endtab %}

{% tab title="View\[OrderForm]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FoHLPbXuYOe5apG5cRHCB%2Fimage.png?alt=media\&token=01015b7a-2570-422d-a492-852bc60e5a0a)
{% endtab %}
{% endtabs %}

### 2. Connect inMemory Database

Connecting *in-memory Database* will be immediately available after creating an *Integration*.

1. **inMemory DB**\[`OrdersDB`]
   1. *Primary Key* -> `id`; *Auto generate* -> `UUID`

{% tabs %}
{% tab title="inMemory DB\[OrdersDB]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FatToSH7N6T1VGy82hDI7%2Fimage.png?alt=media\&token=86021f76-fcd7-4ea6-8412-d835b2580442)
{% endtab %}
{% endtabs %}

### 3. Create an Order Action and Bind it

First, bind the `Create New Order` *Button* with an action sending data into the *in-memory database*. Creating a new *unique UUID* record *in-memory Database* based on the fourth required *input parameter*.

1. Create a `CreateOrder` **Action**, saving *new records* into the *inMemory Database*
2. *Input Parameters:*
   1. *Name ->* `customer` -> *String*; Required -> `true`
   2. *Name* -> `amount` -> *Float*; Required -> `true`
   3. *Name* -> `description` -> *String*; Required -> `true`
   4. *Name* -> `date` -> *String*; Required -> `true`
3. **inMemory DB / Insert** *Parameters*:
   1. *Document* ->`ƒx(/* inMemory DB / Insert)`

#### ƒx(inMemory DB / Insert):

```javascript
{
    customer: params.customer,
    description: params.description,
    amount: params.amount,
    date: params.date
}
```

{% tabs %}
{% tab title="Flow Action\[Create Order]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F1ncwN6sAiNyisDcpQUDD%2Fimage.png?alt=media\&token=efa2a356-fc39-464d-bd1b-0a85304031a4)
{% endtab %}

{% tab title="Outline\[Create Order]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FDXmqWn29lFPoMzBwhJM9%2Fimage.png?alt=media\&token=0c588210-9f1d-4f89-9595-22a5ff77e4e6)
{% endtab %}
{% endtabs %}

Bind the `CreateOrder` with the **Button** `btnCreate` on *Click Event* in `OrderForm`.

Because `Creating New Order` would be a part of an *Overlay sidebar*, it's essential to close it after sending data to the *in-memory Database*. Even a success *toast message* would be in place.

1. *On Event* -> **Call Action** -> *Select* -> `CreateOrder`; *Parameters:*
   1. *customer* -> `fldCustomer.value`
   2. *amount* -> `fldAmount.value`
   3. *description* -> `fldDescription.value`
   4. *date* -> `fldDate.value`
2. *On Success*:
   1. **Close Overlay** -> *Overlay ID* -> `orderForm`; *Button ID* -> `submit`
   2. **Show Toast Message** -> *Type* -> `Success`; *Message* -> "`Order has been created.`"; *Duration(sec)* -> `3`

{% tabs %}
{% tab title="Flow Event\[btnCreate]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F5hgdN05F8xwwvKRFcsjy%2Fimage.png?alt=media\&token=256c3c61-02e1-4e03-84b8-86864d60e1fc)
{% endtab %}

{% tab title="btnCreate\[Call Action]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FasMw2e8RwCcdpx1jDm3x%2Fimage.png?alt=media\&token=feff4153-c5b1-4f5d-88db-2ecc67b16674)
{% endtab %}
{% endtabs %}

### 4. Read All Existing Data and Bind Items with Table

Reading all existing data from the *in-memory Database* is passed by *Action Variable*. In our case, it's named `orderList`, which data is referenced by *Advanced Table*. You can seek its data structure in the *Data Explorer*.

1. Create a new `GetAllOrders` **Action** is returning all existing data from the *in-memory database*.
2. On Start -> **inMemory DB / Get All**

{% tabs %}
{% tab title="Flow Action\[GetAllOrders]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FP2cZiFUePGz8AlrAnc82%2Fimage.png?alt=media\&token=b0ba1e37-b6c6-4666-9f14-13bc0c66c89e)
{% endtab %}
{% endtabs %}

The `orderList` *Variable* provides the connection between the *in-memory Database* and `MainView`. Keep in mind that any changes have to be reflected by reloading the *Variable*.

1. Add **Data from Action** -> *ID* -> `orderList`; *Action Name* -> `GetAllOrders`
2. Associate existing `orderTable` -> *Items* -> `orderList.data`

{% tabs %}
{% tab title="Outline\[MainView]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F9iR0qpR8gQKVcCNuqRuf%2Fimage.png?alt=media\&token=02c8eca7-24fd-4880-82ca-63396e6e984a)
{% endtab %}

{% tab title="orderList\[Parameters]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FyuUKLFUmuZFgD8F1P0kI%2Fimage.png?alt=media\&token=02e5b1f6-e16f-4468-92ae-45d4f50e8b5a)
{% endtab %}

{% tab title="orderTable\[Items]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FTtPc286PNaQquYnPf6e3%2Fimage.png?alt=media\&token=a19e84ee-a516-45cf-b42c-bc8646f2b79d)
{% endtab %}
{% endtabs %}

### 5. Associate Table Items with `orderList` Datasource

Making our *Table* life means associating required *Item elements Values* with `orderList` *Variable*. Remember that the data Array is now part of the `orderTable`, which is visible under the name `items` in the Data Explorer. But, if you will select or associate any of the existing *Table components*, its map structure will appear `item` in the Data Explorer.

1. `txtDate` -> *Value* -> `DATE_FORMAT(item.date, "yyyy-MM-dd")`
2. `txtCustomer` -> *Value* -> `item.customer`
3. `txtDescription` -> *Value* -> `item.description`
4. `txtAmount` -> *Value* -> `"$" + FORMAT_NUMBER(item.amount, 2, ".", ",")`

{% tabs %}
{% tab title="Canvas\[orderTable]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FBCstohTP16i3TOjGiN5A%2Fimage.png?alt=media\&token=bed51cbc-f932-4843-988e-10b1729551ff)
{% endtab %}
{% endtabs %}

### 6. Open\&Close Sidebar Panel on Create New Order

Both of our *Views* are separated until we bind them by putting `OrderForm` into an *Overlay sidebar panel*.

*Clicking on* the `Create New Order`, **Button** will trigger the *Overlay sidebar panel*; closing it a force to reload the `orderList` *Variable* to refresh the content of the Table.

1. Create an *on Click Event* in `btnNewOrder` **Button**.
2. *On Event* -> **Open View in a Sidebar** -> *Overlay ID* -> `orderForm`; *Size* -> `Medium`; *Header Title Value* -> "`Create Order`"; *Header Font Size* -> `Medium`; *Header Icon Name* -> "`mdi/asterisk`"; *Icon Size* -> `Medium`; *View* -> `OrderForm`
3. *On Close* -> **Update State** -> *Method* -> `orderList.reload`

{% tabs %}
{% tab title="Flow Event\[btnNewOrder]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FzT23AH0jiG98RgJcoE3o%2Fimage.png?alt=media\&token=a9b77aff-1fa9-4a51-aaa8-01197845f253)
{% endtab %}
{% endtabs %}

*Clicking on* the `Cancel Order` **Button** will simply close the *Overlay sidebar panel*.

1. *On Event* -> **Close Overlay** -> *Overlay ID* -> `orderForm`; *Button ID* -> `btnCancel`

{% tabs %}
{% tab title="Flow Event\[btnCancel]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F2frryvDOR00ON68XuKwn%2Fimage.png?alt=media\&token=a93e3319-080d-445f-8ef0-8f4ad7136bd8)
{% endtab %}
{% endtabs %}

### 7. Delete Record on `btnItemDelete` Action

Any single of *Items* `orderTable` has its own icon for *Deleting records*. First, let's make `DeleteOrder` **Action** and bind it with the *Delete* **Button**.

*Deleting required data* is associated with the *Input id parameter*.

1. Create an `DeleteOrder` **Action**.
2. *Input Parameter:*
   1. *Name* -> `id` -> *String*; *Required* -> `true`
3. On Start -> **inMemory DB / Delete** -> *Key* -> `params.id`

{% tabs %}
{% tab title="Flow Action\[DeleteOrder]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fn598TfUgmu2xcqh2wdIJ%2Fimage.png?alt=media\&token=b0c49aca-db57-4ddf-bbb8-6b0c7c3b7cfb)
{% endtab %}
{% endtabs %}

Over-clicking on the *Delete Item Button* is secured by an *Open Confirmation Dialog* message.

1. Create an `btnItemDelete` *on* *Click Event*.
2. *On Event ->* **Open Confirmation Dialog**:
   1. *Overlay Header Title -> Value* -> "`Confirm Delete`"
   2. *Overlay Header Icon -> Name* -> "`mdi/delete`"
   3. *Text -> Value* -> "`Do you really want to delete order ${item.description}?`"
   4. *Confirm Button* -> *Text Value* -> "`Delete`"; *Background Color* -> `ERROR`&#x20;
   5. *Cancel Button* -> *Text Value* -> "`Cancel`"; *Background Color* -> *`SECONDARY`*
3. *On Confirm ->* **Call Action** -> `DeleteOrder`; *id* -> `id`
4. *On Success* -> **Update State** -> *Method* ->`orderList.reload`

{% tabs %}
{% tab title="Canvas\[btnItemDelete\[Click]]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fqr2CzSlG164gFTZGzKgW%2Fimage.png?alt=media\&token=722236bb-c73c-4a34-ab4c-60bedcdf7d30)
{% endtab %}

{% tab title="Event\[btnItemDelete]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FEGUjUw3rhrbF1hUhjTBO%2Fimage.png?alt=media\&token=f5b1bd04-6a4c-40fc-8b0a-2bbf60c43a2e)
{% endtab %}
{% endtabs %}

### 8. Editing Existing Records

For editing the existing records, we will use the same `OrderForm` View. That means we have to add an *Input parameter* containing a record id, create an action reading exact data, and handle the difference between save and create buttons.

1. **Add Parameter** -> *Name* -> `id` -> *String*
2. Create an `GetOrder` **Action**.
3. *Input Parameter:*
   1. *Name* -> `id`; -> *String*; *Required* -> `true`
4. *On Start* -> **inMemory DB / Get** -> *Key* -> `params.id`
5. Add **Action Variable** in `OrderForm` View:
   1. *ID* -> `orderEntity`; *Action Name* -> `GetOrder`; *Parameters id* -> `params.id`
   2. *Enabled* -> `params.id != null`

It's good to notice that `GetOrder` *Action* would be enabled just if the *input id parameter* won't be empty.

{% tabs %}
{% tab title="Flow Action\[GetOrder]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fd4AgWp6vLo5lDYolOqkB%2Fimage.png?alt=media\&token=fd75867f-f8fc-4aba-a868-6917ddc37d1f)
{% endtab %}

{% tab title="orderEntity\[Parameters]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fikm2lkB5UdLIaYjsZK8E%2Fimage.png?alt=media\&token=f3d7fbf0-1f0f-499a-9fc3-ba6d9bc33d98)
{% endtab %}

{% tab title="OrderForm\[Parameters]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FQEciw1z4GCKOkp4zrxnk%2Fimage.png?alt=media\&token=417c5c4f-3912-4a9a-b1a5-b5f6269b612e)
{% endtab %}
{% endtabs %}

If we are editing a record, the *input parameter* is not empty. It's also a logic parameter switching between *creating* and *saving buttons*.

1. `btnSave` -> *Visibility Render* -> `params.id != null`
2. `btnCreate` -> *Visibility Render* -> `params.id == null`

*Fields Values* are associated just if in the `orderEntity` existing loaded data.

1. `fldCustomer` -> *Value* -> `orderEntity.data.customer`
2. `fldDescription` -> *Value* -> `orderEntity.data.description`
3. `fldAmount` -> *Value* -> `orderEntity.data.amount`
4. `fldDate` -> *Value* -> `orderEntity.data.date || ""`

### 9. Updating Existing Records

The last *Action* we will prepare in this tutorial named `UpdateOrder` saving the specified `id` record by clicking on the `btnSave` *Button*.

1. Create an `UpdateOrder` **Action**.
2. *Input Parameters:*
   1. *Name* -> `customer` -> *String; Required* -> `true`
   2. *Name* -> `amount` -> *Float; Required* -> `true`
   3. *Name* -> `description` -> *String; Required* -> `true`
   4. *Name* -> `date` -> *String; Required* -> `true`
3. *On Start* -> **inMemory DB / Update** -> *Key* -> `params.id`
   1. *Document* ->`ƒx(/* inMemory DB / Update)`

#### ƒx(inMemory DB / Update):

```javascript
{
  customer: params.customer,
  description: params.description,
  amount: params.amount,
  date: params.date
}
```

{% tabs %}
{% tab title="Flow Action\[UpdateOrder]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FNFJ1U8Z3JP9J0IUPlmz5%2Fimage.png?alt=media\&token=9a2bd5ec-1d81-4886-b719-6006b6d26487)
{% endtab %}
{% endtabs %}

1. Create and on **Click** *Event* of `btnSave`.
2. *On Event* -> **Call Action** -> *Select* -> `UpdateOrder`; *Parameters:*
   1. *customer* -> `fldCustomer.value`
   2. *amount* -> `fldAmount.value`
   3. *description* -> `fldDescription.value`
   4. date -> `fldDate.value`
3. *On Success:*
   1. **Close Overlay** -> *Overlay ID* -> "`orderForm`"; *Button ID* -> "`submit`"
   2. **Show Toast Message** -> *Type* -> `Success`; *Message* -> "`Order has been saved.`"; *Duration(sec)* -> `3`

{% tabs %}
{% tab title="Flow Event\[btnSave]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FaLXfSKsqLPx8cUIM1gTu%2Fimage.png?alt=media\&token=df63fd44-7a7d-46b7-bb7f-1eb592900ef9)
{% endtab %}

{% tab title="btnSave\[Call Action]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FlysN9u7ZxkN799FNmjpG%2Fimage.png?alt=media\&token=8e3fc5c6-4777-494d-8b7d-46ac40f0ace2)
{% endtab %}
{% endtabs %}

### 10. Validating The Order Form

The last step of our tutorial would be to set up the `OrderForm` *Validation*, checking up on missing input Values. Until the Form isn't valid, the save or create Button won't be enabled.

1. Create a new **State Variable** `isFormValid`:
   1. *Initial Value* -> `fldCustomer.valid && fldDescription.valid && fldAmount.valid && fldDate.valid`
2. `btnSave` -> State *Enabled* -> `isFormValid.value`
3. `btnCreate` -> State *Enabled* -> `isFormValid.value`

### The Conclusion

Making the basic nice-looking CRUD application using the in-memory *Database* cannot be easier. We have done a great job in the ten steps.


# How To

How to achieve something


# Custom Auth

Custom users authentication against own authority using a JWT token as Bearer authentication.

Adapptio allows you to set your own authorization process and manage the users yourself. There are several steps you need to do.

1. Create integration to your authority backend
2. Add actions for login, logout and getting current user profile
3. Change Auth type in App Configuration
4. Setup login page&#x20;

## Integration

Add integration to your authority backend, it will be a REST API or a GraphQL in most cases.

<div align="center"><figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F5DIJ1fZ8MivG8B2MZggB%2Fimage.png?alt=media&amp;token=991ef697-5672-4675-95f1-97de80d3da15" alt=""><figcaption></figcaption></figure></div>

## Actions

### Login

First it is important to disable authenticated user check for this action.

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FebgX1gguzJpG1yR7CPZ7%2Fimage.png?alt=media\&token=1913242a-2283-4d35-8293-7c25ae06524d)

Add parameters acording to your API specification, probably a username and a password.

* username / email (settings: string, required)
* password (settings: password, required)

Then add the node with a request to your integration, name it `login`, set the URL to your endpoint and link together input parameters with body parameters (depending on your specification).

{% hint style="info" %}
Do not forgot to switch <mark style="color:blue;">`fx`</mark> mode for setting values dynamically.
{% endhint %}

<img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F9Y3RFIsj5TyyoqYnb6qw%2Fimage.png?alt=media&amp;token=78a143a7-d1cb-4916-8d76-66724720b4a1" alt="" data-size="original">

Next add `Set session` node and store received token as the user identity, again it depends how the previous endpoint returns token.

<img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F3TtMHYzHSOy0jJn62qrQ%2Fimage.png?alt=media&amp;token=92e4ee7e-f8e4-428f-b12e-2f6921b1cbc3" alt="" data-size="original">

And the last step is to add the `Login` node and connect all together. Entire flow would look like this:

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fo7f4KTKVSE02QdsICFgt%2Fimage.png?alt=media\&token=5b6edaae-0069-49ea-8137-33138520c3c8)

### Logout

The logout action is very simple, just add the Logout node, connect it and save.

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FCSZDkTAqIH0upg2cyfmA%2Fimage.png?alt=media\&token=3e790b61-8451-4dca-9af1-7673f1be724f)

### GetAccount

You have to turn off authenticated user again - the same way as you did in the Login action.

Then add a request to your API to obtain user's profile. Set Bearer authorization and link it with the session's `identityKey` where the JWT token is stored.

{% hint style="info" %}
`session.identityKey` now you can use in any other API requests to authorize user.
{% endhint %}

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FWzQ5fxL3vUSKcGbA2BBs%2Fimage.png?alt=media\&token=7f7037d4-b71e-4f36-b854-ed0210787568)

And finaly set output to your account data.

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F627mw2k72opj6kwbu1yQ%2Fimage.png?alt=media\&token=e6ca665d-dfdf-4c6e-9206-6d76c04e2625)

## Change Auth type to Custom

Open the app configuration from main menu and change AuthType to Custom. There are two actions to set.&#x20;

<div align="left"><figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FrM1K455dSekG3gzcDZj8%2Fimage.png?alt=media&amp;token=ba4c6e0c-31dd-46b1-80a7-ae431fd91410" alt=""><figcaption></figcaption></figure></div>

1. The first one is Login action which allows you auto-login in editor. You can add your previously created Login action and set your testing credentials. This will automatically login when you start editor. It won't have any effect in the application.
2. The second one is action to get current user, here you should select GetAccount action.

<figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FDRULR1YDNXqX5WTDqMe1%2Fimage.png?alt=media&amp;token=6d0aaad1-7269-46f6-ab0b-ba3484e8aeb6" alt=""><figcaption></figcaption></figure>

Save the configuration and wait until the editor backend will be restarted. Reopen the editor and move to creation Login view.

{% hint style="warning" %}
Remeber, that every save of application configuration will cause restarting editor backend.
{% endhint %}

## Views

Check if the `main` contains OneOf switching between MainView and auth views - the Login page in our case.

<figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FY6Kr6Y2m5ceqiVaX7lpC%2Fimage.png?alt=media&amp;token=c4da0938-05d2-41fd-a65f-cf1b3145f942" alt=""><figcaption></figcaption></figure>

### Login

Create view Login and design it as on the previous image. Add two fields for email and password and button to finish login.

{% hint style="info" %}
Do not forgot to turn off authenticated user in View Settings.
{% endhint %}

Select button and open OnClick event, where add nodes as on the picture below. In the Call Action node choose the Login action and bind parameters to the fields, then you need to reload session and navigate to Home (or where you want to). In case of login failure you can notice user with toast message, for instace.

<figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FzMBSwblo7NC66QuukDdj%2Fimage.png?alt=media&amp;token=8646a53d-5ae4-4472-8804-c3eb38baf1b0" alt=""><figcaption></figcaption></figure>

And that's it, you just have set up your custom auth flow authenticating users against your backend instead of Adapptio.


# Action Logic

Actions represent a transformation layer that connects UI with integrations. Although actions can be used to implement simple back-end logic, the main purpose is to agregate and modify data.

To do that, you can use the `Output` node and write a simple expression, or you can use the `Transform` node where you can write JavaScript code.

Please see the following subpages for more information.


# Transform Node

Transform node allows you to transform data in the action flow using plain JavaScript.

1. To start, place the `Transform` node into your action flow.
2. In the *Inspector*, find the **Source Code** property. This is where you can put your JavaScript code. Please, don't switch to *fx* in this case. The JS code is entered as plain text. If you switch to *fx*, it means you define the source code with an expression.
3. If you want to use the Transform's output in other flow nodes, don't forget to configure the node's ID (variable name).

Your JavaScript code is executed in the sandboxed environment. This means you have no access to the browser or Node.js APIs. But you can use simple built-in functions like `bota`, `atob`, `encodeURIComponent` and so on.

### Accessing Flow Variables

Because you are writing a JavaScript and not an Adapptio expression, you have to reference flow variables differently. There is a global variable `$` (dollar sign) which contains all flow variables as properties.

**Examples:**

```javascript
$.myApiNode
$.myApiNode.data
$.myAnotherNodeId
```

### Real-world Example

This example demonstrates how to group a list of invoices by subject and calculate the aggregated sum of invoiced amounts for each of them.

```javascript
/* Data structure of invoices:
[
    {
        id: 1,
        your_name: "My Company",
        your_street: "Street 123",
        your_city: "Prague",
        your_country: "CZ",
        client_name: "Client Company",
        client_street: "Street 456",
        client_city: "London",
        client_country: "UK",
        subject_id: 1, // Unique ID of client
        total: 24350,
        ...
    }
]
*/
const invoices = $.apiInvoice.data;

// Let's create a map of Subject (customer) -> { info, total amount }
const subjects = new Map();

// Iterate through all invoices
for (let i = 0; i < invoices.length; i++) {
    const invoice = invoices[i];

    // If the subject (customer) does not exist in the map, create it
    if (!subjects.has(invoice.subject_id)) {
        subjects.set(invoice.subject_id, {
            // Store info about the subject
            subject_id: invoice.subject_id,
            name: invoice.client_name,
            street: invoice.client_street,
            city: invoice.client_city,
            client_country: invoice.client_country,
            // Prepare the total amount counter
            total: 0
        });
    }

    // Add invoice amount to the subject
    const subject = subjects.get(invoice.subject_id);
    subject.total += parseFloat(invoice.total);
}

// Return subjects as an array so we can work with them in UI more easily (like displaying them in a table)
return Array.from(subjects.values());
```


# UI Logic


# Logout

### The Goal

The task is quite simple. Make a one-button application cause Logout.

![The Logout button application](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FihuDnr1PrkpKylxnMhw7%2Fimage.png?alt=media\&token=b77f7504-12b9-4cff-9b8d-be9e286234d2)

### What We Are Going to Do

{% tabs %}
{% tab title="Project Structure" %}

* [ ] View\[Logout]
  * [ ] Container\[cntLogout]
    * [ ] Button\[btnLogout]
      {% endtab %}

{% tab title="View\[Logout]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F5ZK27s9cSHdCsknuY6Yt%2Fimage.png?alt=media\&token=c0d4df88-b6e2-4bc1-bd47-98d1b3f876bb)
{% endtab %}
{% endtabs %}

### 1. Creat and Application

Binding a **Button** component with a specifically *Named route* will force an application to Logout. Let's try to make it.

1. Create a new **View** and name it `Logout`.
2. Put into a **Container**, called it `cntLogout` and set up its *Item Flex* -> `Stretch`; *Horizontal Alignment* -> `Center`; *Vertical Alignment* -> `Middle`
3. Place in a **Button**, name its *ID* -> `btnLogout` and set up as follows:
   1. *Value* -> "`Logout`"; *Width* -> `100px`
   2. *Button Type* -> `Link`; -> *Link Type* -> `Named Route`; -> *Named Route (select)* -> `logout`

That's all and we are done! Your application will log out after clicking on the button. This functionality is available after deployment and running an application.

{% tabs %}
{% tab title="btnLogout\[Type]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FSTdCr0qqvMDgNQPVUoSA%2Fimage.png?alt=media\&token=cbe2ef67-2800-4db8-9c1a-4d06f61ceffb)
{% endtab %}
{% endtabs %}


# Conditional Render

### The Goal

Prepare a basic application showing its *Content* based on *Checkbox Value*.

![The Conditional Render Application](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fea0aCKkxZEU6l1eqzMWL%2Fimage.png?alt=media\&token=0cbaee9b-92ed-4d32-99d8-b445f56bee31)

### The Description

The *Adapptio Components* have the *Render* property, which is *Boolean* and can be triggered by a *ƒx Function*. In our case, we will use the *Checkbox*, returning `true` or `false` *Value*, serving as render condition.

### The Knowledge You Will Get

1. Referencing *Condition Values* in *Functions*.

### The Project Structure

{% tabs %}
{% tab title="View\[MainView]" %}

* [ ] MainView
  * [ ] Container\[`container`]
    * [ ] Checkbox\[`chbContent`]
    * [ ] Box\[`boxContent`]
      * [ ] Text\[`textContent`]
        {% endtab %}
        {% endtabs %}

### 1. Prepare a Basic Layout

The *Layout* must contain a *Checkbox*, which *State* we will check up, and *Box* as a Content.

1. Place in the `MainView` a new **Container**, name its *ID* -> `container`, and set up: *Item Flex* -> `Stretch`; *Padding* -> `X-Wide`; *Spacing* -> `X-Wide`
2. Into `container` put a **Checkbox** with *ID* -> `chbContent` and *Value* -> "`Show content`".
3. Place in a new **Box**, name it `boxContent` and configure as follows:
   1. *Horizontal Alignment* -> `Center`; *Vertical Alignment* -> `Middle`; *Background* -> `WHITE`; *Padding* -> `X-Wide`
4. Into the `boxContent` include a new **Text** component, name it `textContent`, and *Value* -> "`CONTENT`".

### 2. Add a Render Condition

The Render property of the Box `boxContent` must check the state of the Checkbox `chbContent`.

1. Update `boxContent` Visibility -> Render -> `chbContent.value` (ƒx)

### The Conclusion

The *Render condition* can be more complex in dependency on an application need. Let's check the *List of Available Functions* and try to make your condition.

{% hint style="info" %}
Follow up on our *Conditional Routing* tutorial <https://youtu.be/KOB3CkiErS0>
{% endhint %}


# One Of

### The Goal

Prepare an application switching content based on the *One Of* component.

![The One Of Application](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fu2CGg5EskQCbTOvHRr6Q%2Fimage.png?alt=media\&token=2969f925-8eff-4511-b0a9-dc3043b7de0b)

### The Description

In our case, the *Options Dropdown menu* will contain two parameters *Items* that selected *Value* will be checked by the *One Of* component.

### The Knowledge You Will Get

1. The Principle of how to use the One Of component.

### The Project Structure

{% tabs %}
{% tab title="View\[MainView]" %}

* [ ] MainView
  * [ ] Container\[container1]
    * [ ] Options\[dropdown]
    * [ ] One Of\[oneOf1]
      * [ ] Container(#1)
        * [ ] Text\[text1]
      * [ ] Container(#2)
        * [ ] Text\[text2]
          {% endtab %}
          {% endtabs %}

### 1. Prepare a Basic Layout

Let's prepare a basic *Layout* containing the *Option Dropdown* menu and *One Of* component.

1. Place in `MainView` a new **Container** and set up its *ID* -> `container1`; *Item Flex* -> `Stretch`
2. Into the `container1` place a **Options**, name it `dropdown` and add two *Items*:
   1. *#1* -> *Value* -> "`first`"
   2. *#2* -> *Value* -> "`second`"
3. Then placed a **One Of** component with *ID* -> `oneOf1`; *Item Flex* -> `Stretch`; and add two *Options*:
   1. *#1* -> *Option* -> *Name* -> "`First option`"
   2. *#2* -> *Option* -> *Name* -> "`Second option`"
4. Switching the *Clog* by `oneOf1` input to each of the two *Texts* components:
   1. *First option* -> add a **Text**, name its *Value* -> "`FIRST`"; *Text Alignment* -> `Middle`; *Text Style* -> `Bold`; *Font Size* -> `Large`
   2. *Second option* -> add a **Text**, name its *Value* -> "`SECOND`"; *Text Alignment* -> `Middle`; *Text Style* -> `Bold`; *Font Size* -> `Large`

### 2. Add a Switching Conditions

Comparing the `dropdown` *Value* of `oneOf1` *Options Conditions* will trigger the display of different *Content Layouts*.

1. Switch the `oneOf1` *Conditions* to dynamic *Functions* and set up as follows:
   1. *First option* -> *Condition* -> `dropdown.value == "first"`
   2. *Second option* -> *Condition* -> `dropdown.value == "second"`

{% hint style="info" %}
Don't forget that any *Current Values* of any existing components are visible in the Data Explorer.
{% endhint %}

{% tabs %}
{% tab title="DATA EXPLORER\[dropdown]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fx8o07vAYKHqNRPPt55L0%2Fimage.png?alt=media\&token=df1c5de8-a943-4c08-b8ed-346a823d994f)
{% endtab %}
{% endtabs %}

### The Conclusion

The *One Of* component is an effective tool how to switch between content. Try to add more *Option Layouts* and change them by a different component method.

{% hint style="info" %}
Follow up on our *One Of* tutorial <https://youtu.be/ywBr11REwrQ>
{% endhint %}


# Data & Dynamic values


# Custom Variable

### The Goal

Add and set up *Custom Variable* and check its setting in the *Data Explorer*.

![Custom Variable](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FRXoNyp2sR37JCExNzztu%2Fimage.png?alt=media\&token=46e1cc75-756f-4729-9101-c9e995491f4e)

### The Description

The *State Variable* is part of a current *View* where its setting is immediately reflected in the *Data Explorer* and its plays important role in storing temporary data within a current *View*.

{% hint style="info" %}
Keep in mind that *State Variables* are not addressable between another *Views*.
{% endhint %}

### The Knowledge You Will Get

1. *Addressing* and *Editing* of a *State Variable*.

### The Project Structure

{% tabs %}
{% tab title="View\[MainView]" %}

* [ ] State Variable\[`myVariable`]
  {% endtab %}
  {% endtabs %}

### 1. Create a State Variable

1. Clicking on the *Add Datasource icon* select **Add State Variable**.
2. Name its *ID* -> `myVariable` and switch its *Type* to *Number*; *Initial Value* -> `6`

{% hint style="info" %}
You can watch the `myVariable` *attributes* and *functions* in the *tab* from this moment.
{% endhint %}

{% tabs %}
{% tab title="Outline\[myVariable]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FGgH4ZCHwrBFOibKjZETz%2Fimage.png?alt=media\&token=1980a6ee-117d-4605-961e-144392798fd0)
{% endtab %}

{% tab title="Data Explorer\[myVariable]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FxaqshkBDhw30RDbwXqbS%2Fimage.png?alt=media\&token=b29c4ee2-e119-4b38-b3ce-d9df33a3003f)
{% endtab %}
{% endtabs %}

### 2. Associating `myVariable` Value

1. Consider that we are not going to play with *Layout*; simply place in the *Canvas work field* a new **Text** component and set up its *Value* as follows:
2. *Value* -> `myVariable.value`

{% hint style="info" %}
The Current Value of the myVariable can be dynamically mapped by a (ƒx) *function*.
{% endhint %}

{% tabs %}
{% tab title="Canvas\[MainView]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FZV9eoqqC2Xajz2jZwUL9%2Fimage.png?alt=media\&token=92637ac4-45af-45d4-b9fb-43f3edb26132)
{% endtab %}

{% tab title="text1\[Value fx]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FxYOno3KPn6GURfkSwmJz%2Fimage.png?alt=media\&token=2e135828-357f-4159-8e6c-c05193cab162)
{% endtab %}
{% endtabs %}

### The Conclusion

Using the *State Variable* can be effectively used in many cases. Try to change *State Variable Types* to *Array* or *Map*, and define their *Values* as a constant or function.

{% hint style="info" %}
Follow up on our *Custom Variable* tutorial <https://youtu.be/ul_NTuZODWc>
{% endhint %}


# Data from Action

### The Goal

Prepare a *Basic Application* returning data from action and its content display in the *Canvas*.

![Data from Action Application](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FY0PxPEvv4wcrJ4z9QQBO%2Fimage.png?alt=media\&token=4e9d58e9-dab7-49f2-8170-2a74dec49bea)

### The Description

Let's say that we will prepare an action returning `Hello World` *String* which will be displayed in the middle of the *Canvas* by the *Text* component.

### The Knowledge You Will Get

1. Working with data returned by action and its association with a component.

### The Project Structure

{% tabs %}
{% tab title="View\[MainView]" %}

* [ ] Data from Action\[`GetHelloWorldText`]

* [ ] MainView
  * [ ] Container\[`container1`]
    * [ ] Text\[`text1`]
      {% endtab %}

{% tab title="Action\[MainView]" %}

* [ ] `GetHelloWorldText()`
  {% endtab %}
  {% endtabs %}

### 1. Prepare an Action Returning `Hello World` String

The action itself is not executed till we call it by some *Method* or schedule it. Let's prepare an *Action* returning `Hello World` *String* and test its output.

1. Create an *Action* and name it `GetHelloWorldText`.
2. *On Start*: Place in the **Output** *Function*, wire it together, and set up its *Option* -> *Value* –> "`Hello World`"
3. *Save & Run Action* in the Tester and check if the *Return Value* is `output: "Hello World"`

{% tabs %}
{% tab title="Flow Chart\[GetHelloWorldText]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fv074wkwuHWEqdRqKZRH7%2Fimage.png?alt=media\&token=79177fd4-dc73-45ec-822a-cc2f3cfd5657)
{% endtab %}

{% tab title="GetHelloWorldText\[Output]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FFBMPOAvbt0wJszXdE509%2Fimage.png?alt=media\&token=aa5435e8-16c0-4fd8-89ae-e0d570fd6f01)
{% endtab %}

{% tab title="Tester\[GetHelloWorldText]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fvc2SxQP8S4NSY0Om4t5g%2Fimage.png?alt=media\&token=e67544d8-a40a-4531-80b1-4956bdf4f2bf)
{% endtab %}
{% endtabs %}

### 2. Add Data from Action in the MainView

Binding together `GetHelloWorldText` *Action* and *Add Data from Action* will provide an associable data source in the current `MainView`.

1. Create a new **Add Data from Action** in the *Outline Panel* and name it `myData`.
2. In the Inspector set up *Action Name* -> `GetHelloWorldText` by *click & select*.
3. Check `myData` structure in the *Data Explorer*. If you did it right, you can see `myData` -> `output: "Hello World"`.

{% tabs %}
{% tab title="Outline Panel\[myData]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fb1mGBH4TNHZrjLlRo0tB%2Fimage.png?alt=media\&token=33957d5d-4715-4659-b7c4-4407a0185c5b)
{% endtab %}

{% tab title="myData\[Action Name]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FDbGJf9o6xMx7pWmYk8um%2Fimage.png?alt=media\&token=3fcf66a3-7284-4637-b2c6-f6664ce4eb84)
{% endtab %}

{% tab title="Data Explorer\[myData]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FFljbwvNvfYkFFjSmz3dd%2Fimage.png?alt=media\&token=cf8caf69-267d-47c5-84bc-5bcf10d30fbb)
{% endtab %}
{% endtabs %}

### 3. Create an Output Text Layout

Showing *data content* can be done by the *Text* component, as in our case here.

1. Place into the *Canvas* a new **Container** and set up its *Item Flex* -> `Stretch`; *Vertical Alignment* -> `Middle`
2. Into the *Container* put a **Text** component with the following configuration: *Text Alignment* -> `Center`; *Text Style* -> `Bold`; *Font Size* -> `XXXLarge`; *Foreground* -> `RED`
   1. Finally, associate *data* returned by *Action*: *Value* -> `myData.data`

### The Conclusion

We learned that *Actions* can provide *returning values* that have to be bound by adding data sources in the required *View*. Try to add more returning values and associate them with different *Components*.

{% hint style="info" %}
Follow up on our *Data from Action* tutorial <https://youtu.be/zdR6fGLgbDo>
{% endhint %}


# Dynamic Value

### The Goal

Prepare a *Basic Application* binding *Input Text Field* Value with another *Text* component.

![Dynamic Value Application](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FpuIh68xziRWwcgiX4cYB%2Fimage.png?alt=media\&token=cf39fed5-8029-4c39-99f9-289914cf5683)

### The Description

Any component's values can be referenced as data output for another. We are using *Text Input* which *Value* is bound with empty *Text*.

### The Knowledge You Will Get

1. Understand how to *Value* association works.

### The Project Structure

{% tabs %}
{% tab title="View\[MainView]" %}

* [ ] MainView
  * [ ] Container\[`cntMain`]
    * [ ] Text Input\[`txtInput`]
    * [ ] Text\[`txtOutput`]
      {% endtab %}
      {% endtabs %}

### 1. Prepare a Basic Layout

Let's start with *Main Container* with two included components; *Text Input* and *Text*.

1. Place in a new **Container**, name it `cntMain`, and set up its *Item Flex* -> `Stretch`; *Horizontal Alignment* -> `Center`; *Vertical Alignment* -> `Middle`
2. Into  the `cntMain` put a **Text Input** and name it `txtInput`.
3. Right under place a new **Text** and set up its *Properties* as follows: *ID* -> `txtInput`; *Text Style* -> `Bold`; *Font Size* -> `Large`

### 2. Bind a Dynamic Value

Associating *Dynamical Value* by a *Function* can be done in just two steps.

1. Switch *Value* of `txtOutput` to dynamic *Function* by clicking on the right side *ƒx* icon.
2. Edit `txtOutput` *Value* -> `txtInput.value`

{% hint style="info" %}
Watch your Canvas what happens if you will type just `txtInput`.
{% endhint %}

{% tabs %}
{% tab title="txtOutput\[Properties]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FEN5zTD3HYLfzEQZEVMQd%2Fimage.png?alt=media\&token=78bd10a3-5408-42a2-bb93-50b8288c52aa)
{% endtab %}

{% tab title="Data Explorer\[txtInput]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fms7UQJfEcv115qJfu6A8%2Fimage.png?alt=media\&token=f059ce3a-d1ce-40d8-9ddf-652556b2ec06)
{% endtab %}

{% tab title="txtOutput without .value fx" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FtUlihRbbkMYm0MUE2hbf%2Fimage.png?alt=media\&token=58815079-354c-4423-8625-eb4a3b07aa68)
{% endtab %}
{% endtabs %}

### The Conclusion

Binding and referencing *Values* are efficient and always reflect the state in the *Data Explorer*.

{% hint style="info" %}
Follow up on our *Dynamic Value* tutorial <https://youtu.be/F-SmrBlVUZY>
{% endhint %}


# Change Value from Event

### The Goal

Prepare a *Basic Application* showing the exact number with the *Subtraction Button*.

![Basic Substracting Application](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fxw9XXzEUQ3deXgXi9sGZ%2Fimage.png?alt=media\&token=5fae2742-2bac-4308-aa68-f6599fb454d6)

### The Description

In most cases, applications like a calculator are effectively composed by the *Grid*. The *Text component* reflects the *State Variable*, which has been subtracted by one by triggering an *Event* of *Button*.

### The Knowledge You Will Get

1. How to work with *Values* from the *Events*.

### The Project Structure

{% tabs %}
{% tab title="View\[MainView]" %}

* [ ] MainView
  * [ ] Grid\[`grid1`]
    * [ ] Text\[`text1`]
    * [ ] Button\[`button1`]
      {% endtab %}
      {% endtabs %}

### 1. Prepare a Grid Layout

First, let's prepare a *Basic Grid Layout* structure, including *Text* and *Button* components.

1. Place in a **Grid** *Layout component*, keep *ID* -> `grid1`; *Columns* -> `12`, and set up its *Item Flex* -> `Stretch`; *Spacing* -> `None`
2. Into `grid1` put a new **Text**, keep its *ID* -> `text1`; *Text Alignment* -> `Center`; *Text Style* -> `Bold`; *Font Size* -> `Large`; *Vertical Alignment* -> `Center`
   1. *Layout* -> *Item Position* -> *X* -> `1`; *Y* -> `3`; *Width* -> `8`; *Height* -> `6`
3. Place into the `grid1` a new **Button**, keep *ID* -> `button1`, and set up its *Icon Name* -> "`mdi/minus`"; *Icon Size* -> `Large`
   1. *Layout* -> *Item Position* -> *X* -> `10`; *Y* -> `3`; *Width* -> `1`; *Height* -> `6`

{% tabs %}
{% tab title="Current Canvas\[MainView]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FR8pb8Y6WzDC4UR8kvPTB%2Fimage.png?alt=media\&token=e1571619-5b74-41ad-ae64-aac207fc59dc)
{% endtab %}
{% endtabs %}

### 2. Create and Bind a New State Variable

A *State Variable* will contain numeric information bonded with the *Text* output.

1. **Add State Variable** by clicking on the *Plus icon* in the Outline Panel.
2. Name it `myCounter`, switch its *Type* to *Number*, and set up *Initial Value* -> `10`.
3. Switch *Value* of `text1` to *ƒx Function* and set -> `myCounter.value`

{% tabs %}
{% tab title="text1\[Value]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FgnV3szpm3oGtJ8QGmgqp%2Fimage.png?alt=media\&token=cad30f63-cdba-4026-9f5c-64a8991ae2f4)
{% endtab %}
{% endtabs %}

### 3. Bind an Event Logic to the `button1`

The last step we have to do is bind an *Event*, subtracting the *Value* of `myCounter` by one.

1. Select the *Event* option in the `button1` and **Add Event Logic** *Plus* icon -> `Call Method`
2. Set up already wired up *Call Method* as follows:
   1. *Method* -> `myCounter.setValue`
   2. Switch *Argument #1* to *ƒx Function* -> `myCounter.value - 1`

{% hint style="info" %}
*setValue* is an available *Method* in *State Variable*, visible in the *Data Explorer*.
{% endhint %}

{% hint style="info" %}
The *Argument* has to be set up as a *ƒx* *Function* because of the reading of the *current Value*.
{% endhint %}

{% tabs %}
{% tab title="Flowchart button1\[Call Method]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fxy45waIxp79qegXKrmhf%2Fimage.png?alt=media\&token=f7465e3c-2a85-4018-a11e-b320bbdfee5f)
{% endtab %}

{% tab title="Call Method\[Settings]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fih1p5tL1XQFAbYEk0hZ9%2Fimage.png?alt=media\&token=ad8ce0f4-2e40-4139-895b-cad51d29c4da)
{% endtab %}
{% endtabs %}

### The Conclusion

Any available *Methods* can be seen in the *Data Explorer* and have to set up *Arguments*.

{% hint style="info" %}
Follow up on our *Change Value from Event* tutorial <https://youtu.be/Kee6oXJdzaY>
{% endhint %}


# Loading Data from Action to Form

### The Goal

Our goal is to return data from an action and put them into form fields as initial values.

The most common use cases are *edit* pages. We have data already in the database and we want to load them into to the form so user can edit them.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FWC8dNkupay9Yn13X6pTk%2Fimage.png?alt=media&amp;token=0e3f8634-b603-4e9b-a2e9-3b6104055974" alt="Form components with data loaded from an action"></div>

### 1. Create an action

Let's create an action that will return some sample data.

1. From the *Main Menu*, create a new **Action** and name it `getTask`.
2. From the *Functions* panel drag the **Output** function and drop it to the *flow canvas*. Then connect `Start` node with the `Output` node.
3. Select the `Output` node and edit it's configuration options as follows:
   1. Change the **type** of `Return value` property to `Map {}`(a little icon next to the field).
   2. Add three items: `id`, `name` and `content`
   3. Open each item and set their value to:\
      id: `1`, name: `Task AAA`, and content: `Hello from task 1`.
4. To test if your setup is correct, click on the `Save & Run Action` button. You should see the following data in the *Tester* output:

```
id: 1
name: "Task AAA"
content: "Hello from task 1"
```

{% tabs %}
{% tab title="getTask Flow" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FfWqTSNcz3xfMpuhA1ZQb%2Fimage.png?alt=media\&token=9c93424a-9694-4e6f-92c9-b8396351fdcd)
{% endtab %}

{% tab title="Output Settings" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FaNRpXQxJYQxZVddwgfMp%2Fimage.png?alt=media\&token=a5c7f850-2f82-4f5d-8bf6-e0d4367c9a14)
{% endtab %}

{% tab title="Map Item Settings" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FpQxcbXSlRCUUDEw95Fnp%2Fimage.png?alt=media\&token=08ac54d6-3f03-4e0a-b087-106e1c2a5fb3)
{% endtab %}
{% endtabs %}

### 2. Create a view

Now, we are going to create a simple view with two form elements and one action data source.

1. From the *main menu*, create a View and name it as you wish.
2. In the Outline panel, click on the Plus button and select **Add Data from Action**. This will create an object called *Action Data Source.*
3. Then in the *inspector* panel, click on the *Action Name* field and select the `getTask` action we've just created in the previous step.
4. Also, we recommend to change the action data source ID to `tasks`.
5. If configured correctly you should see the `tasks` item in the *Data Explorer* panel. When you open it it should have the `LOADED` state and you should see data returned from the action in the `data` property.
6. Now, place the **Text Input** and **Text Area** components into the view canvas. Change their IDs as follows: Text Input:  `fldName`; Text Area: `fldContent`.

### 3. Link data

So far we've added the action data source and components. Now, let's link them together.

1. Select the `fldName` component.
2. In the [*Inspector*](/getting-started/editor/components-panel/inspector) panel, find the **Value** property and switch it to expression (click the **fx** button).
3. Now let's put there an expression that returns the data from our data source:\
   `task.data.name`. This tells us that we want to access the `name` property from our `data` that has been returned from our `tasks` data source. You can see this hierarchy in the *Data Explorer* panel.
4. Do the same for the `fldContent` component as well but change `name` to `content` in the value expression.

{% tabs %}
{% tab title="Components List" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fo3jIYR69m9XzChejRgVe%2Fimage.png?alt=media\&token=3456a2c4-8b8e-4541-a2fc-96332a891102)
{% endtab %}

{% tab title="Components Structure" %}

* [ ] Action \[getTask]

* [ ] Data Action Variable \[task]

* [ ] Container \[container1]
  * [ ] Text Input \[fldName]
  * [ ] Text Area \[fldContent]
    {% endtab %}
    {% endtabs %}

{% tabs %}
{% tab title="Adding Action Data Source" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FcZii0tXkFwxvDwdMHjNF%2Fimage.png?alt=media\&token=9cdfefa9-7ccd-46fd-9d81-8523a89d2f70)
{% endtab %}

{% tab title="Data Source Settings" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FDPeIj3QmrRN0jYJcYeyS%2Fimage.png?alt=media\&token=b4f2614d-afc4-4a7e-9ae6-7bb57f2188e7)
{% endtab %}

{% tab title="Data Explorer" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FYtRu5NYOpbhRYR3KVRJn%2Fimage.png?alt=media\&token=ca60a200-67d6-4296-a088-ab834d8a48ce)
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Text Input and Field" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FAVeJibeMYJFcd2zUU7FO%2Fimage.png?alt=media\&token=4d3e215f-b9ca-4239-b157-7b28640e2fed)
{% endtab %}

{% tab title="Binding Text Input Value" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FvBNw7BSxpuOPKgafyNms%2Fimage.png?alt=media\&token=c6996427-d470-4b76-9c5c-f4a1cfdcde6f)

```
task.data.name
```

{% endtab %}

{% tab title="Binding Text Area Value" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FM67ybKdzpwtcPLrx1mAo%2Fimage.png?alt=media\&token=97ab1310-c851-47b6-9469-6874bf3779b9)

```
task.data.content
```

{% endtab %}
{% endtabs %}

### Conclusion

Try to upgrade the form - add a field for a missing ID property.


# Sending Data to Action from a Form

### The Goal

Send data from form components to action by triggering a button event.

![Form for sending filled data](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FRRQbR9B6El4KCHqDHSxd%2Fimage.png?alt=media\&token=82604447-1c4c-472f-b39b-a067ec681046)

### What We Are Going to Do

{% tabs %}
{% tab title="Project Structure" %}

* [ ] Action \[`updateTask`]
  * [ ] *Parameters*

    * [ ] `id` \[*Integer*]
    * [ ] `name` \[*String*]
    * [ ] `content` \[*String*]

* [ ] View \[`Form`]
  * [ ] Container \[`container1`]
    * [ ] Text Field \[`fldName`]
    * [ ] Text Area \[`fldContent`]
    * [ ] Button \[`button1`]
      {% endtab %}

{% tab title="View\[dataFromAction]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FgfZVZalk1WMhiDGNnICi%2Fimage.png?alt=media\&token=9ff4af8e-81c6-4c8b-953b-9fc4a9060807)
{% endtab %}

{% tab title="Action\[updateTask]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fbft5NvLXxNtyCgkAuuRy%2Fimage.png?alt=media\&token=abb450d1-18ce-492f-b38c-d85f206f8685)
{% endtab %}
{% endtabs %}

### 1. Create an Action

First, lets create blank action with fixed input parameters.

1. From the *Main Menu*, create a new **Action** and name it `updateTask`.
2. In the Outline panel add three parameters by clicking on the Plus button.
   1. Rename the parameters on `id`, `name`, and `content`.
   2. Set up properties of `id` to *Integer* in the *Inspector* panel, and switch *Required* to `true`. It makes the parameter mandatory.
   3. Leave the `name` and `content` configure to *String*.
3. All available parameters are visible in the *Tester* panel, where a yellow warning shows mandatory blank parameters. In our case `id`.
4. Try filling some values in the testing parameters corresponding to the *value-type* and clicking the `Save & Run button`.
5. If the input parameters are valid *Tester* output will returns following:

```
status: "LOADED"
output: null
```

{% tabs %}
{% tab title="Create updateTask Action" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FFQId4YT9d8JuvwREvu0I%2Fimage.png?alt=media\&token=e52a1085-cd36-444b-b506-233e5e1261c4)
{% endtab %}

{% tab title="Setting Input Parameters" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FH84aKvzTOiqgOoEeRebx%2Fimage.png?alt=media\&token=ae22332b-c06b-4e79-b8a1-2254f9da667c)
{% endtab %}

{% tab title="Required Integer id" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FnnH89FwdnHVc7rb3Flh9%2Fimage.png?alt=media\&token=4298148b-a7a8-4050-93af-9097e6b65ead)
{% endtab %}
{% endtabs %}

### 2. Design a Basic Form

Design a basic form containing **Text Input** and **Text Field** components.&#x20;

1. Put a **Container** on the canvas *work-field* and name it `container1`.
2. Set up its layout on *Stretch* with horizontal alignment at right.
3. Place **Text Input** into`container1`, name it`fldName`, and set up its *Label* on 'nam&#x65;*'*.
4. The next component placed will be a **Text Area**, named `fldContent`, and labeled 'content'
5. *Values* of both components can be filled as a *constant* or mapped by action from the previous [Loading Data Tutorial](/working-with-adapptio/how-to/data-and-dynamic-values/loading-data-from-action-to-form); what is exactly our case here.
6. *Values* of `fldName` are set up `task.data.name`; `fldContent` *value* is `task.data.content`.

{% tabs %}
{% tab title="Form Components" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FzpJGxD7jqOhLnO2ysxH0%2Fimage.png?alt=media\&token=583a115f-9411-490a-8683-99353a7cdd42)
{% endtab %}

{% tab title="Text Input Setting" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fmut0jxHiMppUE30mS59e%2Fimage.png?alt=media\&token=134ad889-0e8a-4fcc-80a5-3f9180fca3f2)
{% endtab %}

{% tab title="Text Area Setting" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F0oYKZgRetPes1HK4dzJr%2Fimage.png?alt=media\&token=7d6db74f-3086-4918-8574-43df8f11e968)
{% endtab %}

{% tab title="Current Outline" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FbggTVVJSOffzgOPu7Iax%2Fimage.png?alt=media\&token=be075cb4-9217-427a-b440-871efca58c1e)
{% endtab %}
{% endtabs %}

### 3. Binding a Button with Action

Clicking the new button triggers an event bound with our action.

1. Place a new **Button** component into `container1` and name it `button1`.
2. Design it as you wish, or leave it at the *Default*.
3. Switch from *Options* to *Event panel* in the *Inspector* and clicking on the 'click' option will open the *Event editor*.
4. Drag & Drop **Call Action** component to *Flow canvas* and wire it together with **Event Start**.
5. Selecting the **Call Action** component allows us to define its attributes in *Inspector*.
6. Click on 'Click to select' and choose `updateTask` action.
7. Blank parameters will appear at *Inspector* that moment.
   1. Set up parameters *Values* on the following: `id` -> `task.data.id`; `name` -> `fldName.value;` `content` -> `fldContent.value`
8. We are done! *Data* will be sent to the action by clicking on the `button1` in *Preview mode* or after *Application deployment*.

{% tabs %}
{% tab title="Flow Event Canvas" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fk3JsoM43xP6Z74pflyfV%2Fimage.png?alt=media\&token=f9e52e45-77f2-4905-8913-0c73937b6d29)
{% endtab %}

{% tab title="Call Action Parameters" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fsp4yP4f4NYucNHt0LqkT%2Fimage.png?alt=media\&token=a801d152-3a67-446e-ba81-361b3253d38f)
{% endtab %}

{% tab title="Final Outline" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FWcvyO3HWK1Vk4vDOellJ%2Fimage.png?alt=media\&token=bc028723-4ec8-4822-8fe0-f00ed7d5aec7)
{% endtab %}
{% endtabs %}

### The Conclusion

This method is commonly used to reference any outgoing forms or other components values referenced to action.


# Server-side Dropdown Autocompletion

You can

You can configure the *Options* component to load items dynamically based on user value (search).

To do that, you need to prepare an *Action* with a `search` parameter that will return filtered items. Then you need to add that action as a *Data Source* into your view. And finally, you have to link the data source with your Options component and configure it properly. Let's do a quick example.

<details>

<summary>TL;DR - Quick steps</summary>

* [ ] Create action
  * [ ] Add `search` parameter of type *String*
  * [ ] Configure action to return filtered data
* [ ] In your view, add **Options** component
  * [ ] Enable **Allow custom value and/or search**
  * [ ] In the subsection, set **Type** to **Search only** (or as you need)
  * [ ] Disable **Search on client**
* [ ] In your view, add **Data from action**
  * [ ] Set it to your action that returns filtered items
  * [ ] Link the search parameter to the `customValue` property of the Options component
* [ ] In your **Options** component
  * [ ] Link Items to the data from your action.

</details>

### 1. Create Action

Let's create an action called `GetCompletionItems`. It will have a `search` parameter of type *String* and one **Transform Node** with the following JavaScript code. Data returned from this transform node are directly compatible with the **Options** component's property `items`.

In a real case, you will have to set up the action in a way that matches your needs, this is just an example.

```javascript
const createItem = (value, label) => ({
  value: value,
  labelText: {
    value: label
  }
});

const items = [
  createItem("testA", "Test A"),
  createItem("testB", "Test B"),
  createItem("testC", "Test C"),
  createItem("anotherTestA", "Another Test A"),
  createItem("anotherTestB", "Another Test B"),
  createItem("anotherTestC", "Another Test C")
];

if ($.params.search) {
  return items.filter((x) => {
    return x.labelText.value.includes($.params.search);
  });
} else {
  return items;
}
```

The action will look like this:

<figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F22uNb5Z4diNcycUHBGN0%2Fimage.png?alt=media&amp;token=9229423f-eb8a-4a67-9c1d-5de860393c9a" alt=""><figcaption></figcaption></figure>

You can Run the action to verify it works correctly.

### 2. Add Options Component

Next, let's add an **Options** component to your View and configure it as follows.

* [ ] Set ID to `optionsField`
* [ ] Enable **Allow custom value and/or search**
* [ ] In the subsection, set **Type** to **Search only** (or as you need)
* [ ] Set **Placeholder** to `Search...`
* [ ] Disable **Search on client**

<img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FoKZUaiBdlvavw2T9SbTX%2Fimage.png?alt=media&amp;token=e2096cd4-3f78-4799-a72c-d078e26f3946" alt="" data-size="original">

### 3. Add Data Source

Now, in your view, add **Data from action** and in the inspector, select the action you've created in the first step - `GetCompletionItems`.

Change the *data source* ID to `completionItems`.

Then link the `search` parameter to the `customValue` property of the **Options** component. To do that, set the `search` parameter to *fx* and enter the following expression.

```
optionsField.customValue
```

The `customValue` property contains a text a user enters during the search. So when the user is searching, this expression will update the action parameter, and new completion items will be loaded.

<img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FbZNtquFFxd0ldnQrQq4q%2Fimage.png?alt=media&amp;token=4ecd93af-4d5d-423e-8a19-c3c74f3998dd" alt="" data-size="original">

### 4. Link Completion Items to Options Component

The final step is to link data from the action to the Options component's items.

Select the Options component and configure the **Items** property to *fx,* and enter the expression:

```
completionItems.data
```

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FVHsl27hTrp30RmlfAQl3%2Fimage.png?alt=media\&token=99956bd4-9670-483a-ae33-fdaa1e016e79)

### 5. Test It

Then switch to the *Preview mode* and click on the Options component. You should see all the items, and when you start typing into the search field, only the matching items should be visible.

<figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FK8HO6bKwVS1AkE0BIEub%2Fimage.png?alt=media&amp;token=58848778-023d-47f5-8950-2016635028ba" alt=""><figcaption></figcaption></figure>


# Visual


# Styling Icon Button

### The Goal

Design a rounded *Button* suitable for editing records.

![Designed Rounded Button](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fwi4dLUOJpw6Em0YSEuJN%2Fimage.png?alt=media\&token=4f7dc127-5778-42a7-ba0e-3471cf386c6a)

### The Description

Any type of *Buttons* used for editing records must be slightly visible and contain an “*easy-to-read*” small icons.

### The Knowledge You Will Get

1. How to design icons.

### The Project Structure

{% tabs %}
{% tab title="View\[MainView]" %}

* [ ] MainView
  * [ ] Container\[`container1`]
    * [ ] Button\[`button1`]
      {% endtab %}
      {% endtabs %}

### 1. Prepare a Canvas and Design a Button

1. Place in a **Container**, set up its *Item Flex* -> `Stretch`; *Horizontal Alignment* -> `Center`; *Vertical Alignment* -> `Middle`
2. Put in a new **Button** and configure its settings as follows:
   1. Empty its default *Text* -> *Value* -> ""
   2. *Icon* -> *Name* "`mdi/lead-pencil`"; *Size* -> `Small`
   3. *Style* -> *Button Style* -> `Custom`
      1. *Background* -> `WHITE`; *Foreground* -> `TEXT`; *Border Color* -> `LIGHT_GRAY`; *Border Width* -> `1px`; *Border Radius* -> `18px`

### The Conclusion

As we can see, styling buttons is fast and easy. Try to make your style.

{% hint style="info" %}
Follow up on our *Icon Button* tutorial <https://youtu.be/qeCDpKsg7Xc>
{% endhint %}


# Layouts


# Centered Box

### The Goal

One of the most frequently used layouts is a centered box. Any situation requiring showing information in the middle of the screen must follow this procedure.

![Typical example of a centered box component](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FQDs21MwCwHUNqZ83u66s%2Fimage.png?alt=media\&token=e9903a70-738d-45d4-b35b-9b3ec593e1ca)

### What We Are Going to Do

{% tabs %}
{% tab title="Project Structure" %}

* [ ] View\[`centeredBox`]
  * [ ] Container\[`container1`]
    * [ ] Box\[`box1`]
      {% endtab %}

{% tab title="View\[centeredBox]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FUlwlkN6C6n6LIDNzhehS%2Fimage.png?alt=media\&token=ec65b12f-e94d-446f-be45-5b544b65ba60)
{% endtab %}
{% endtabs %}

### 1. Create a Centered Box

Preparation of a centered box is easy and intuitive, taking just a few steps.

1. Create a new **View** called it `centeredBox`.
2. Place in a new **Container***,* name it `container1,`and set up properties as follows:
   1. *Horizontal Alignment* -> `Center`; *Vertical Alignment* -> `Middle`
   2. The *Item Flex* has to be set up on `Stretch`, and the rest of the responsive screens setting is `Inherit from the base`.
   3. Optionally, you can define *Padding* and *Spacing* attributes to `Medium`, for further use.
3. Put in a new **Box**, and name it `box1`.
   1. Configure its Layout properties as *Background* -> `WHITE`; *Border Color* -> `GRAY`; *Border Width* -> `2px`; *Border Radius* -> `10px`; *Shadow* -> `Large`
   2. Both of *Width* and *Height* are `350px` for the *Base* and *Large Screens*; It can be acceptable even for *Tablet* setting, but *Phone Screen* looks better on `250px`.

{% tabs %}
{% tab title="The Base and Large Screen 350px" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FDli8qGV2VgtsgRiFuQU0%2Fimage.png?alt=media\&token=1b0e5f7b-b753-4f2b-b5ac-3a4f7213d195)
{% endtab %}

{% tab title="The Phone Screen 250px" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FVeC4BphKXAwsOmTnEoAo%2Fimage.png?alt=media\&token=58426ae5-3697-46cc-9f6c-d1359189a645)
{% endtab %}
{% endtabs %}

### The Conclusion

Always remember that any layout properties have to be adapted to different screen types. Of course, unless we are developing just desktop or cell phone applications.


# Header & Sidebar Layout

### The Goal

With Adapptio, you can construct layouts literally within a few minutes. This tutorial showing the most common design is a fixed header with a sidebar panel.

![Typical example of the Header & Sidebar layout](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F2gPAk3gOx9ys1E77Vrtm%2Fimage.png?alt=media\&token=776619ca-cfe1-4faf-8e0e-a777da2ff3b8)

### What We Are Going to Do

{% tabs %}
{% tab title="Project Structure" %}

* [ ] Application Header\[`Header`]
  * [ ] Label\[`hdrLabel`]
* [ ] Container\[`appContent`]
  * [ ] Sidebar Layout\[`sidebar`]
    * [ ] Content(*Content*)
      * [ ] Box\[`cntBox`]
        * [ ] Text\[`cntText`]
    * [ ] Content(*Sidebar*)
      * [ ] Box\[`sidebarPanel`]
        * [ ] Text\[`cntSideBar`]
          {% endtab %}

{% tab title="View\[appLayout]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FFrW8qpp79EKSMA4pllD5%2Fimage.png?alt=media\&token=e77cfe96-2bc1-413e-87ff-3e404a0417c6)
{% endtab %}
{% endtabs %}

### 1. Create a New Header and Sidebar

Let's create a basic sketch of Header\&Sidebar layout.

1. Create a new **View** called `appLayout`.
2. Place a new **Application Header** to the *canvas work-field* and name it `Header`.
   1. Set up properties of the `Header` as a follows: *Height* -> `Large`; *Horizontal Alignment* -> `Center`; *Vertical Alignment* -> `Middle`; *Background* -> `Light Gray`
3. Right under `Header` put a new **Container** called it `appContent` and set up it *Item Flex* on `Stretch`.
4. Into the `appContent` place a new **Sidebar Layout**, name it `sidebar`, and set up *Padding* of the *Main Content* on `Wide`.&#x20;

{% tabs %}
{% tab title="Current appLayout" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fu06DxnjoHENikb8IiyJU%2Fimage.png?alt=media\&token=7f8e2d4a-f409-4428-8762-de8650eb4a57)
{% endtab %}

{% tab title="Current Components" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FgnhmeRZaI9bWY8mKkDke%2Fimage.png?alt=media\&token=000d2a18-33e4-4390-8958-f4151c69c483)
{% endtab %}
{% endtabs %}

### 2. Place Content Boxes

Inside boxes serve as content elements separated between sidebar and content layouts.

1. Place a **Box** into the `Content Container` and name it `cntBox`.
   1. It's properties will be configured as follows: *Background* -> `White`; *Shadow* -> `Large`; *Padding* -> `Wide`; *Item Flex* -> `Stretch`
2. Place a second **Box** into the `Content Sidebar`, name it `sidebarPanel` and set up its properties.
   1. *Background* -> `Gray`; *Foreground* -> `White`; *Padding* -> `Wide`; *Item Flex* -> `Stretch`

### 3. Fill a Content (Optional)

If you like to obtain the same results as we do, continue with the following steps.

1. Put a **Label** into the `Header`, name it `hdrLabel`, and set up its properties as follows: *Value* -> "`Addaptio Daily Planet`"; *Font Size* -> `XXXLARGE`; *Icon Name* -> `mdi/earth`; *Icon Size* -> `X Large`; *Icon Foreground* -> `RED`
2. Place a **Text** into the `sidebarPanel`, name it `cntSideBar`, and following configuration: *Value* -> \[copy text from tab bellow]; *Markdown* -> `true`; *Markdown Blocks* -> `true`
3. Same do with a **Text** placed into cntBox, name it cntText, and configure as follows: *Value* -> \[copy text from tab bellow]; *Markdown* -> `true`; *Markdown Blocks* -> `true`

{% tabs %}
{% tab title="SideBar Markdown" %}

```
#### Tum rapta nostris
##### Giganteo satis
## Tecta qui
## Nutrix
#### Praelate potest
##### nuper sed fama
```

{% endtab %}

{% tab title="Content Markdown" %}

```
/# Relinquam movit duro exploratum

## Cupit lacrimans Priamides frondes effuso

[Lorem markdownum minor](http://www.spectandique.org/metum-enixa), a ligamina
fidis infantem ad tactus anguem, animo vesana corpora. Face nitidis per calido
aevo est diu nostra opprobria in rumoribus nova. Mitius vos numen, tela in
[Pittheia](http://omne-spectat.org/) alios? Caeli sunt tum, est in digiti leti
placitas reprensa Argiodus, ipse munus, Minervae? Cetera animaeque loquentis et
auctor rescindere tandem, corde, rursus acumina, qui sua.

Proxima bella filum nec videor tumulumque super illi est causa sagitta et
extremas potentem; ad. Non et estque me nec foret perque, sublimis deferri
nuribusque tu patet obliquat corpora ita supinis; saxa. Hoc prohibemur fusum,
dextraque totidem regno et inque positus fistula enim. Adsonat tergo suffundit
nunc alebat, ille in tyranni faciendus fallere cingentibus metu desilit mittam
et dotale.

## Virgineosque ecce iam mea candescere iuventae adhibet

Campis natus deam tamen condas ab pugnavique nolle qua ab vertice non: ictus
*modo* vivente? Geri thalamoque huius est possent magnae, non arcus tibi
nostras, ex conspicit. Sedet furialibus inque Pisaeae. Iactatis manibus fessos!

- Opis at nec Aeacidae meque
- Aditus alvo
- Late perfudit erat maiorem proelia voluptas
- Forma doluisse et gratia parte patuisset convocat

## Potentia iaculum ut eburno circum

Mea obsita ingenium quoque? Deus non plura fervida longoque. Sed Ausonia
caelestia nymphe tardius soporem illum crederet in mea soporem pulsant actum
caeno.

In eum non animi invidiam non dominum per quacumque advertere et nepotum iramque
per in Apollineos aurea vocandus. [Tectos obscura](http://necmodus.io/) laturus,
et ponat bellaque sumit illo pollice. Sagittae meminere obitumque iubet, dubius
dubitat. Ille silvisque erit; lumina leni. Fontes ea ungula notum positisque,
quae vivum ut nebulas fecit; honorat et tremit cepit praeter.

## Repressit fugio lacusque intellectam oscula tota pulsa

Iovis aevum utroque, Naxon habet paterno, quoque crescat, vita, arces etiam
capit ilicet moriorque. Vehi amoris lacertis; et quem: in acuta; parte aut
dixerat quod cum brevis. Ubi herbas qualia balatum et dumque relinquant parant
undas excoquit!

    if (gopher == redundancy_management_camera) {
        superscalar_optical_twitter = guiGigahertz;
        cameraVolume.rssOutput *= card(spywareInterlacedRt, raid +
                pseudocode_url, pdf_ram.wildcard_laser_leaderboard(1, google,
                cluster_link_host));
    } else {
        output_gif_tiger.fios += remoteHeatNanometer(5, 17, backside *
                dataKernelWinsock);
    }
    pixelClock = spreadsheet_word_ivr(integer_webmaster_cluster(1));
    microcomputer_noc_sample(on);
    duplex += undoMatrix;
    number_input += services;

Berecyntia solis duorum nisi, carissime at aera populisque esse inserere
lacrimas crurum, quem insuper mactatos gaudens a at. Sunt omnibus, dum ab iactis
annos facitis mente Tyrrhena, multos festum postquam ceris iusta. Contingere
silva **Atridae** dissuadere coloni pandis validos **Argo** ludit et *solitum
horridus*, lumine mensam **feri** verba. Non sub sub et cuspide pateat bracchia
cognorat videt incumbere statione aspera piacula gratissima.
```

{% endtab %}
{% endtabs %}

### 4. Switching Sidebar Position

If we need to switch the sidebar panel position for a specific reason, it can be simply done with one click.

1. Switch on the `sidebar` and change *Sidebar Position* -> `Right`.

![Switching position of the Sidebar](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fi439HFeUk3tJ4xKB8CvU%2Fimage.png?alt=media\&token=90e79cbb-393d-445b-bc2a-da8c90a54e9e)

### The Conclusion

As you tried, layout designing is fast and intuitive, and very soon, you will shape your manuscript using it for your applications. Try to make your layout from scratch.


# Grid Form Layout

The Grid layout is commonly used to make forms, even for canvas fields gathering a lot of different components with fixed positions.

![The new form based on the Grid layout](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FmYZCeAH4N2Su3QlPsT47%2Fimage.png?alt=media\&token=4848e20b-60fe-4709-b589-d0ae5a6bc5af)

### What We Are Going to Do

{% tabs %}
{% tab title="Project Structure" %}

* [ ] View\[`gridForm`]
  * [ ] Container\[`cntMain`]
    * [ ] Box\[`gridBox`]
      * [ ] Grid\[`gridForm`]
        * [ ] Container\[`gridHeader`]
          * [ ] Text\[`formName`]
          * [ ] Text\[`subTitle`]
        * [ ] Spacer\[`spacerHeader`]
        * [ ] Options\[`fldGender`]
        * [ ] Text Input\[`inpFirstName`]
        * [ ] Text Input\[`inpSurename`]
        * [ ] Text Input\[`inpEmail`]
        * [ ] Text Input\[`inpOccupation`]
        * [ ] Text Input\[`rngSatisfactionOutput`]
        * [ ] Options\[`optField`]
        * [ ] Range\[`rngSatisfaction`]
        * [ ] Text Area\[`txtMessage`]
        * [ ] Spacer\[`spacerFooter`]
        * [ ] Button\[`btnSendMessage`]
          {% endtab %}

{% tab title="View\[gridForm]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FakdeBFWcN3Tyfu8yRfdk%2Fimage.png?alt=media\&token=9aeccc19-c2c9-4689-84bd-ce620208cc74)
{% endtab %}
{% endtabs %}

### 1. Prepare a superior Grid

The list of components can look complicated, but it is easily more than you think. Let's prepare a basic structure with Grid.

1. Create a new **View** and name it `gridForm`.
2. Place a **Container**, name it `cntMain`, and set up properties as follows:
   1. *Horizontal Alignment* -> `Center`; *Vertical Alignment* -> `Middle`; Item Flex -> Stretch
3. Into `cntMain` put a **Box** called it `gridBox`. Its properties are the following:
   1. *Vertical Alignment* -> `Middle`; *Background* -> `#FDFEE2`; *Shadow* -> `Medium`; *Padding* -> `Wide`; *Width* -> `70%`;
   2. Optionally set up *Height* -> `500px` what is handy for working with a Grid at the beginning. You can delete this property at the end of this tutorial.
4. Place a **Grid** into `gridBox` and name it gridForm. Set up its *Item Flex* -> `Stretch` and keep original *Columns* -> `12`.

{% tabs %}
{% tab title="Current View\[gridView]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FYuYAbwTqGR9dPvJiVeo3%2Fimage.png?alt=media\&token=3e6b1cf9-3af0-4b00-8e02-d0522383c41d)
{% endtab %}

{% tab title="Current Components\[gridView]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FtIEpFCPpgMqrX6DwtOYH%2Fimage.png?alt=media\&token=555cbb64-8fb6-48b1-8738-c51d9d715a52)
{% endtab %}
{% endtabs %}

### 2. Create a Form Header

Playing with design is essential. Building applications is not just about functionality but even also about feeling.

1. Place a **Container** and name it `gridHeader`.
   1. Set up its properties as follows: *Horizontal Alignment* -> `Center`; *Vertical Alignment* -> `Middle`.
   2. *Screen Base Position* -> *X* -> `3`; *Y* -> `3`; *Width* -> `6`; *Height* -> `8`
2. Put **two** **Text** components into the `gridHeader` and name them `formName`; `subTitle`
   1. `forName` properties: *Value* -> "`Adapptio Grid Form`"; *Text Style* -> `Bold`; *Font Size* -> `XXXLarge`
   2. `subTitle` properties: *Value* -> "`Easy, Intuitive and Fast Composition of A Forms`"; *Font Size* -> `Medium`

{% tabs %}
{% tab title="Current View\[gridView]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FAgm3DBjBTOHV8yotsBEk%2Fimage.png?alt=media\&token=caba44b8-aee5-4450-9c7e-481ff8f6ff0e)
{% endtab %}

{% tab title="Current Components\[gridView]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FkxfvotYIAzGmLmiOrDMo%2Fimage.png?alt=media\&token=133d4f8f-9918-4940-a15c-b7ed48637921)
{% endtab %}
{% endtabs %}

### 3. Placing a Form Components

Place **all forms components** into the `gridForm` following step by step.

1. **Spacer** -> *ID* -> `spacerHeader`; *Foreground* -> `TEXT`; *Height* -> `1px`; *Spacing* -> `Narrow`;
   1. *Screen Base Position* -> *X* -> `1`; *Y* -> `11`; *Width* -> `10`; *Height* -> `1`
2. **Options** -> *ID* -> `fldGender`; Add two *Items* -> `Male` `Female`; *Placeholder* -> "`Gender`";
   1. *Screen Base Position* -> *X* -> `1`; *Y* -> `14`; *Width* -> `2`; *Height* -> `6`
3. **Text Input** -> *ID* -> `inpFirstName`; *Label Value* -> "`First Name`"
   1. *Screen Base Position* -> *X* -> `1`; *Y* -> `20`; *Width* -> `3`; *Height* -> `6`
4. **Text Input** -> *ID* -> `inpSurename`; *Label Value* -> "`Surename`"
   1. *Screen Base Position* -> *X* -> `1`; *Y* -> `27`; *Width* -> `3`; *Height* -> `6`
5. **Text Input** -> *ID* -> `inp`Email; *Label Value* -> "`Email Address`"
   1. *Screen Base Position* -> *X* -> `1`; *Y* -> `34`; *Width* -> `3`; *Height* -> `6`
6. **Text Input** -> *ID* -> `inpOccupation`; *Label Value* -> "`Occupation`"
   1. *Screen Base Position* -> *X* -> `1`; *Y* -> `41`; *Width* -> `3`; *Height* -> `6`
7. **Text Input** -> *ID* -> `inpSatisfactionOutput`; *Value* -> *//\*adding logic in upcoming paragraph*
   1. *Screen Base Position* -> *X* -> `8`; *Y* -> `14`; *Width* -> `3`; *Height* -> `4`
8. **Options** -> *ID* -> `optField`; Add two *Items* -> `I will stay faithful to the Adapptio` `I'm not interested in the product`; *Type* -> `Radio Group`
   1. *Screen Base Position* -> *X* -> `4`; *Y* -> `13`; *Width* -> `4`; *Height* -> `12`
9. **Range** -> *ID* -> `rngSatisfaction`; *Label Value* -> "`Product Satisfaction`"
   1. *Screen Base Position* -> *X* -> `8`; *Y* -> `19`; *Width* -> `3`; *Height* -> `6`
10. **Text Area** -> *ID* -> `txtMessage`; *Placeholder* -> "`Let us know how happy you are with Adapptio`"; *Label Value* -> "`Text Message`"
    1. *Screen Base Position* -> *X* -> `5`; *Y* -> `26`; *Width* -> `6`; *Height* -> `21`
11. **Spacer** -> *ID* -> `spacerFooter`; *Foreground* -> `TEXT`; *Height* -> `1px`; *Spacing* -> `Narrow`;
    1. *Screen Base Position* -> *X* -> `1`; *Y* -> `49`; *Width* -> `10`; *Height* -> `1`
12. **Button** -> *ID* -> `btnSendMessage`; *Value* -> "`Send Message`"
    1. *Screen Base Position* -> *X* -> `9`; *Y* -> `51`; *Width* -> `2`; *Height* -> `4`

### 4. Adding Logic to Range Text Field

Making the `rngSatisfactionOutput` life is realized by referencing values from the existing **Range** component.

1. Set up `rngSatisfactionOutput` *Value* -> ƒx(`"From " + rngSatisfaction.value.from + "% to " + rngSatisfaction.value.to + "%"`)

{% tabs %}
{% tab title="Code Editor\[rngSatisfactionOutput]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FGt3zgOia79XD8QZaVo0G%2Fimage.png?alt=media\&token=353dc612-ea64-46e7-a6f6-2b3b76c4e21b)
{% endtab %}

{% tab title="Data Explorer\[rngSatisfaction]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FoHFzOcCoiKnkrx1neuxq%2Fimage.png?alt=media\&token=0ed94e7c-e30c-43c4-8c6e-93de87493126)
{% endtab %}

{% tab title="rngSatisfactionOutput(ƒx)" %}

```
"From " + rngSatisfaction.value.from + "% to " + rngSatisfaction.value.to + "%"
```

{% endtab %}
{% endtabs %}

### The Conclusion

Creating forms using a grid layout is fast and effective, especially when you are familiar with form components and their properties. Try to make your form with referencing values.


# Stretched Layout in Row

### The Goal

Design a *Stretched Layout* in one row, containing *Text* and *Menu Button* components.

![One Row Stretched Layout Application](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FNHUiwSD2JRXolSddRD6k%2Fimage.png?alt=media\&token=8a9d31f9-23eb-4db2-93ca-e6eac3f9cd11)

### The Description

Any components sorting in rows can have their *Item Flex* properties; if it's required to have components responsively on both sides, the middle one has to be stretched.

### The Knowledge You Will Get

1. How to set up *Stretched Layout*.

### The Project Structure

{% tabs %}
{% tab title="View\[MainView]" %}

* [ ] MainView
  * [ ] Container\[`cntMain`]
    * [ ] Container\[`cntRow`]
      * [ ] Text\[`text1`]
      * [ ] Spacer\[`spacer1`]
      * [ ] Menu Button\[`menuButton1`]
        {% endtab %}
        {% endtabs %}

### 1. Desing a Stretched Layout

*Stretched Layout* will be separated into two *Containers*; one would be stretched as a *Main*; the second would be stretched as a *Row*.

1. Place in a new **Container**, name it `cntMain`, and set up its *Item Flex* -> `Stretched`; Padding -> `X-Wide`
2. Place in a second **Container** with the following setup: *ID* -> `cntRow`; *Flow* -> `Into row`; *Vertical Alignment* -> `Middle`
3. Into `cntRow` place three following components, keep their IDs, and configure them properly:
   1. **Text** -> *Item Flex* -> `None`; *Value* -> "`Some Text Here`"; *Font Size* -> `Medium`
   2. **Spacer** -> *Item Flex* -> `Stretched`; *Foreground* -> `TRANSPARENT`
   3. **Menu Button** -> *Item Flex* -> `None`; *Font Size* -> `Medium`

### The Conclusion

Stretching *Layout components* need some practice to understand. If more than two stretched layouts are in a *one-parent*, they would split their space between them.

{% hint style="info" %}
Follow up on our *Stretched Layout in Row* tutorial <https://youtu.be/lnVZCyJBwhw>
{% endhint %}


# Components

Working with components


# Composed Chart

### The Goal

Describes how to visualize data using the Composed Chart component.

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FuvO298AcAR4vtpwRYGa7%2Fimage.png?alt=media\&token=138d164f-8f2b-406c-a4e0-423cfc4956ab)

### Supported Data Format

The chart supports data in array of arrays or array of objects formats. In case you do not have data in one of these formats, you should use the transform node in an action to convert them. Or you can try to use built-in data mapper, which will be described further.

Recommended data format:

```json
// array of arrays
[
    [10, 20, ...],
    ...
]

// array of objects
[
    { "time": 1653590420, "x": 123.321, ... },
    ...
]
```

<details>

<summary>Create an action generating random data</summary>

Add transform node, connect and paste the source code:

```javascript
const timeData = [];
const dateNow = new Date();

for(let i = 0; i < 100; i++) {
  const timestamp = dateNow.toISOString();
  
  const dataPoint = [timestamp, Math.random()*1000];
  timeData.push(dataPoint);

  dateNow.setMinutes(dateNow.getMinutes() - 1);
}

return timeData;
```

</details>

### Chart Configuration

Place a chart to a view and select it. In the inspector you can find a complex setting for:

* Items (data) - representing a bunch of all chart's data.&#x20;
* Axes - defining chart's multi-level axes.&#x20;
* Series - specifying each data series extracted from the items (data).
* Ranges - specifying dividing lines or areas in the chart.

Set Items (data) to be dynamic and connect with your data.

#### Axes Configuration

The most important is to set a unique *Id*, which will be used to link series to the axis. You should also set a proper *Type. Type:* *Value* - if an axis should represent numeric values; *Category* - if an axis should display categories as a pure text; or *Datetime* - if an axis will work with time (ISO-8601 or unix timestamps).

{% tabs %}
{% tab title="Setting for Time" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FL5O8JQNsuf9GHYgQ3mB7%2Fimage.png?alt=media\&token=1d781570-4d62-40c4-bba6-024dd359bfbf)
{% endtab %}

{% tab title="Setting for Values" %}
&#x20;![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FSJOGE8ihGCxvET8AV34g%2Fimage.png?alt=media\&token=0d9a7d2a-b21d-430e-b995-bb50cee1450c)
{% endtab %}
{% endtabs %}

#### Series Configuration

Just below the common fields, such as series title, color, area opacity or type of series, you can find settings for X-axis and Y-axis.&#x20;

The `Axis Id` field specifies the Id of the axis, you already defined before in Axes configuration.&#x20;

The `Axis data key` is used to extract data from the Items (data). Generally speaking, this is the path to the root property. In case, you are using data in format: array of arrays (as in this doc), you can specify the index on which the property is located.

{% tabs %}
{% tab title="Array of arrays" %}

```json
[ 
    [2020, 10], 
    [2021, 20], 
    [2022, 30] 
]
```

Axis data key: `0` tells you, that a value at the first position will be mapped to the related axis. -> 2020; 2021; 2022

Axis data key: `1` tells you, that a value at the second position will be mapped to the related. axis. -> 10; 20; 30
{% endtab %}

{% tab title="Array of objects" %}

```json
[ 
    {"year":2020,"value":10}, 
    {"year":2021,"value":20}, 
    {"year":2022,"value":30} 
]
```

Axis data key: `year` tells you, that a value of property `year` will be mapped to the related axis. -> 2020; 2021; 2022

Axis data key: `value` tells you, that a value of property `value` will be mapped to the related axis. -> 10; 20; 30

{% hint style="warning" %}
Only root property can be set this way. In case of complex objects, see the next tab: *Array of complex structures*.
{% endhint %}
{% endtab %}

{% tab title="Array of complex structures" %}

```json
[ 
    {"date":{"year":2020,"month":1},"value":10}, 
    {"date":{"year":2021,"month":1},"value":20}, 
    {"date":{"year":2022,"month":1},"value":30} 
]
```

Axis data key: `date` tells you in this case, that the child object shall be passed to the mapper. -> {"year":2020,"month":1}, {"year":2021,"month":1}, {"year":2022,"month":1}

Now you need to enable data mapper and create an expression telling how to extract the value you want.

To access only `year`, write to the mapper field:

```javascript
item.year
```

Axis data key: `value` tells you, that a value of property `value` will be mapped to the related axis. -> 10; 20; 30

{% hint style="info" %}
The item is available to access value of the selected Axis data key.
{% endhint %}
{% endtab %}
{% endtabs %}

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FTBElz3xEj0qKz8bVwxPB%2Fimage.png?alt=media\&token=110a3068-acbe-441d-9aa6-df5969bd0935)

#### Ranges Configuration

![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FmjGpU7nJBMs4sb3ftiks%2Fimage.png?alt=media\&token=8c75bb71-d7d9-4ed1-b645-77a7b60d084b)

{% hint style="info" %}
Under construction
{% endhint %}


# Advanced Table

### The Goal

Prepare a simple *Application* showing users' data in an *Advanced Table*.

![Advanced Table Application](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FV9x41pT23xjVAwPKK4Vd%2Fimage.png?alt=media\&token=eec8ca8f-83e3-406b-8b63-f3b372370a0b)

### The Description

Any loaded *Datasource* can be bound with a content of an *Advanced Table*. In our case, we will bind an *Action*, returning the user's data.

### Knowledge You Will Get

1. How to bind *Datasource* with an *Advanced Table*.

### The Project Structure

{% tabs %}
{% tab title="View\[MainView]" %}

* [ ] Datasource\[`users`]

* [ ] MainView
  * [ ] Container\[`cntMain`]
    * [ ] Label\[`lblUsers`]
    * [ ] Advanced Table\[`tblUsers`]
      * [ ] Column `#1`
        * [ ] Text\[`txtName`]
      * [ ] Column `#2`
        * [ ] Text\[`txtAge`]
          {% endtab %}

{% tab title="Action" %}

* [ ] `GetUsersData`
  {% endtab %}
  {% endtabs %}

### 1. Create an Action Returning Data

First, prepare an *Action* returning the user's data in the *array*.

1. Create a new **Action**, name it `GetUsersData`.
2. *On Start* -> Add and wire together **Output** and set up its return *value* as a *ƒx function.*

```javascript
[
  {name: "John Doe", age: 32},
  {name: "Jane Doe", age: 29}
]
```

Now you can test your *Action* if the proper *Datasource* is returned.

{% tabs %}
{% tab title="FlowChart\[GetUsersData]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FRBTx33Q9snBsXOVm9pAf%2Fimage.png?alt=media\&token=61d0e838-22f3-4dcf-8064-9c3557a4b496)
{% endtab %}

{% tab title="GetUsersData\[Output]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FjQV2x5YoMp8ql878VggQ%2Fimage.png?alt=media\&token=eea87e3b-9092-4011-86c6-b8ba50af6703)
{% endtab %}

{% tab title="Tester\[GetUsersData]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FoZH92qWMjcfFqDUU6twP%2Fimage.png?alt=media\&token=b0c74656-a4e9-49cd-9381-9fa7f77b6e36)
{% endtab %}
{% endtabs %}

### 2. Add and Bind the `MainView` Datasource

*Adding Data from Action* will bind the user's list with the `MainView`.

1. Click on **Add Data from Action** in the *Outline Panel*, name it `users`, and associate *Action Name* -> `GetUsersData`

{% tabs %}
{% tab title="Outline\[users]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FneWWwtlhgDCZuYtAz70O%2Fimage.png?alt=media\&token=4a6c7a77-9b2f-46a2-80c4-6b9467e17713)
{% endtab %}

{% tab title="users\[Settings]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FlXiKaGvfsinIEUr4IAF9%2Fimage.png?alt=media\&token=6a9b26c4-e9f7-4ed7-8c1b-67d5346eb6d6)
{% endtab %}
{% endtabs %}

### 3. Prepare a Basic Layout with an Advanced Table

Let's prepare a basic *Layout* with an *Advanced Table*.

1. Place a new **Container** into the `MainView` *Canvas*, name it `cntMain`, and set up its *Item Flex* -> `Stretch`; *Padding* -> `Wide`; *Spacing* -> `Medium`
2. If you like, place into `cntMain` a **Label**, name it `lblUsers` and configure as follows:
   1. *Value* -> "`Users Advanced Table`"; *Text Style* -> `Bold`; *Font Size* -> `XLARGE`; *Foreground* -> `RED`; *Icon Name* -> "`mdi/account-supervisor`"; *Icon Size* -> `Medium`
3. Finally, put into `cntMain` a new **Advanced Table**, set up its *ID* -> `tblUsers` and add two columns:
   1. &#x20;*Column* `#1` -> Add one *Column Titles* -> `Name`
   2. *Column* `#2` -> Add one *Column Titles* -> `Age`

### 4. Bind `users` Datasource with the Advanced Table

Making your `tblUsers` *Table* life means that you have to bind Items property with users *Datasource* and place in *components* representing data content.

1. Edit `tblUsers` -> *Items* -> `users.data` bind as a *ƒx function.*
2. Into the *Table Canvas* columns, place two *Text* components and bind them dynamically:
   1. *Column* `Name` -> add **Text**; *ID* -> `txtName`; *Value* -> `item.name`
   2. *Column* `Age` -> add **Text**; *ID* -> `txtAge`; *Value* -> `item.age`

{% hint style="info" %}
Keep in mind that you can always follow different *Datastructures* by selected components in the *Data Explorer*. You can see `items` under `tblUsers`; meanwhile, `item` on the column chosen component.
{% endhint %}

{% tabs %}
{% tab title="tblUsers\[Items]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F4gpV0THLd9zwPILyR1KZ%2Fimage.png?alt=media\&token=d8fb4355-74a3-4072-8de9-3a873302cb09)
{% endtab %}

{% tab title="Data Explorer\[tblUsers]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FOBUNqZRDXRabd09zYoha%2Fimage.png?alt=media\&token=c9765240-decd-4a19-bdab-50738342ff58)
{% endtab %}

{% tab title="Data Explorer\[txtName]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F95VumIWYus0nCX1ajj0g%2Fimage.png?alt=media\&token=c8106d4d-da1b-485b-b4b3-6df50b434a27)
{% endtab %}
{% endtabs %}

### The Conclusion

The *Advanced Tables* are effectively used with many different components, like icons or others. Try to add more columns and upgrade *return values* by the *Action*.

{% hint style="info" %}
Follow up on our *Advanced Table* tutorial <https://youtu.be/GJjuOJ6rOrw>
{% endhint %}


# Custom Component

{% hint style="danger" %}
**This feature is not available in production yet.**
{% endhint %}

Custom Component is a regular component that allows you to specify an HTML template, CSS and lifecycle JavaScript functions that hook into the Adapptio framework.

Using this feature, you can create your own UI components, including high-performance solutions and custom logic. A custom component is able to provide data to the scope (available to other components), including a method. Also, it's able to trigger events.

### Configuration Properties

* **Component Props** - custom data you can pass to the component. These data are available in the lifecycle functions, and the **On Props Changed** function is called when props change.
* **HTML Template** - an initial HTML that is rendered when the component is created. When this property changes, the component will be disposed and mounted again.
* **CSS class** - a CSS class name of the div element that's wrapping the HTML template. Use this class to style your component.
* **CSS code** - a custom CSS code injected into the page. This code is injected directly into the page header, and it applies globally. You have to be careful not to conflict with existing CSS, or you can break the editor or an application styling. If multiple custom components provide the same CSS code (eg. you copy/paste the component), it will be injected only once.
* **On Mount** - a JavaScript function that is executed when the component is mounted to the DOM. See the lifecycle functions section below.
* **On Props Changed** - a JavaScript function that is executed when Component Props change. See the lifecycle functions section below.
* **On Update Method** - a JavaScript function that is executed when the `update` method is called via an event. See the lifecycle functions section below.
* **On Dispose** - a JavaScript function that is executed when the component is being destroyed. In this function, you must unbind all event listeners, stop all timers, etc., to avoid memory leaks. See the lifecycle functions section below.
* **External JS scripts** - a list of URL addresses of external JS scripts to be loaded. The On Mount function will be executed after all external scripts are successfully loaded. If multiple components require the same scripts, they will be loaded only once. You can use this feature to load 3rd party libraries.

{% hint style="info" %}
During a server-side rendering, only the HTML template will be rendered. All other scripts will be executed on the client side.
{% endhint %}

### Lifecycle Functions

The lifecycle functions are JavaScript functions executed at certain component phases.

**The following variables are available in all lifecycle functions:**

* `props` - An object containing **Component props** as passed from the configuration.
* `state` - A mutable object instance you can use to store any data and pass them around between individual function calls.
* `domEl` - A DOM element that contains the rendered HTML template. You can use this to access child elements, bind events, etc.
* `scopeData` - Current component scope data. Scope data are exposed to other components.
* `setScopeData(prevData: any|(prevData: any) => any)` - A function to set new scope data. To perform an atomic update, pass a function into the `prevData` argument. It will receive previous scope data as the first argument. Using this, you will avoid data racing conditions.
* `triggerEvent(data: any) => any` - A function you can call in order to trigger a custom event (Inspector -> Event -> Custom Event). Data you pass into the `data` argument will be available in the event flow as an `eventData` variable.
* `componentMode` - A string (enum) specifying if the component is being rendered in the edit mode, read-only mode or in standard mode (preview / deployed application). Possible values are: `"normal"`, `"readonly"`, `"edit"`. You can use this property to enhance an editing experience (like disabling pointer events or allowing inline editing).

{% hint style="warning" %}
Your JavaScript code is not sandboxed and runs directly on the page. **If you create an infinite loop or computationally expensive operation, your browser may become unresponsive, and you might be unable to save your changes.**

If this happens, reload the page. Scripts will be automatically disabled.

Anyway, try to avoid these issues by writing safe code.
{% endhint %}

#### On Mount

This function is called when the component is created, the initial HTML template is rendered, and DOM elements are mounted. Also, all external scripts are loaded as well.

Use this function to bind event listeners and to define shared functions. You can store any data by assigning them to some property in the `state` variable. See the example below.

#### On Props Changed

This function is called when the `Component Props` value changes. You can use this function to update your component's DOM or other internals based on new props.

#### On Update Method

A custom component provides the `update` method in its scope. This method can be called from regular event flows. When the method is called, the On Update Method is executed.

In addition to the variables described above, in this function, the `args` variable is available. This variable contains method call arguments in an array.

#### On Dispose

This function is called when the component is destroyed (unmounted). Your job is to perform correct clean-up in this function - unbind event listeners, stop timers, etc. This is very important in order to avoid memory leaks and performance issues.

{% hint style="info" %}
In the editor, when any of the lifecycle function's code or HTML template changes, the component is always disposed and then mounted again.
{% endhint %}

## Hello World Example

Let's create a simple custom component with HTML input.

It will receive two props: `label` and `initialValue`. When a user types in, the value will be exported to the scope, and a custom event will be triggered.

Also, when component props change, the DOM will be updated. When the `initialValue` changes, it will reset the field value to the initial one.

And it will handle an `update` method with `setValue` argument that will directly set the input's value.

#### Component Props

* [ ] Add `label` prop with value `Your name`
* [ ] Add `initialValue` prop with value `World`

#### HTML Template

```html
<label>
  <span class="fld-label"></span>
  <input type="text" class="fld-input" value="" />
</label>
```

#### CSS

Set **CSS Class** to `custom-cmp-hello` and the **CSS Code** to:

```css
.custom-cmp-hello {
  padding: 10px;
}

.custom-cmp-hello .fld-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
}

.custom-cmp-hello .fld-input {
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #cccccc;
  font-size: 15px;
}
```

#### On Mount

```javascript
// Get references to template elements
const labelEl = domEl.querySelector(".fld-label");
const inputEl = domEl.querySelector(".fld-input");

/**
 * @typedef {{ label: string, initialValue: string }} Props
 */

/**
 * Handle update of props
 * @param {Props} newProps
 */
state.updateProps = (newProps) => {
  state.initialValue = newProps.initialValue;

  labelEl.innerText = newProps.label;

  if (state.initialValue !== inputEl.value) {
    inputEl.value = state.initialValue;
    state.handleValueUpdate();
  }
};

/**
 * Handle update of input value
 * Provides new value into scope
 */
state.handleValueUpdate = () => {
  setScopeData((prevData) => {
    return {
      ...prevData,
      initialValue: state.initialValue,
      value: inputEl.value
    };
  });

  triggerEvent({
    name: "valueChanged",
    value: inputEl.value
  });
}

/**
 * Sets the input value and triggers update
 * 
 * @param {string} newValue
 */
state.setValue = (newValue) => {
  inputEl.value = newValue;
  state.handleValueUpdate();
}

// Bind event listener
inputEl.addEventListener("input", state.handleValueUpdate);

// Trigger initial props update
state.updateProps(props);
```

#### On Props Changed

```javascript
state.updateProps(props);
```

#### On Update Method

```javascript
if (typeof args[0] !== "string") {
  throw new Error("Invalid argument #1 - expected string.")
}

switch(args[0]) {
  case "setValue": {
    if (typeof args[1] !== "string") {
      throw new Error("Invalid argument #2 - expected string.")
    }

    state.setValue(args[1]);

    break;
  }
  default: {
    throw new Error("Invalid operation.");
  }
}
```

#### On Dispose

```javascript
const inputEl = domEl.querySelector(".fld-input");
inputEl.removeEventListener("input", state.handleValueUpdate);
```

### Test It

And that's it. Try to switch to the **Preview Mode**, type something in and watch how the scope changes. Also, you can try to display a toast message every time the value changes.

Here's an example of a demo view.

<figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FgTXSRonoX00s04oQxkew%2Fimage.png?alt=media&amp;token=65f05008-19f3-40b1-8b75-eb39206f56bb" alt=""><figcaption></figcaption></figure>


# Examples of Applications

Examples of applications


# SaaS Platforms

### The Adapptio

Did you know, that complete [Adapptio Platform](https://adapptio.cloud) is built in Adapptio?

![Application overview](https://lh4.googleusercontent.com/BX1SndAH767LgKW7bHmhkZ3gXWyD9cR-CNvpZrW87K18fd46oAxaoo6FQBRIqmKCbW8varzjwoc9Q2UdMRzBMbhXpVVBxRoGGd9zEV9061_JdVZ7apqQdHFBaPygJLKOHGuCZf4DpYqZ9_mZXpfDNg)


# Customers Portals

### Door - **real estate management**

![Door - login](https://lh4.googleusercontent.com/vAQ1oLO8_b5mPN230BV4AAHOvKkdTTAtClvMzmldpqjIw4PNlVCYORPzFtyJtI1MpUGsS7hFQYVUgorw_LkPt4wZAg-zrjuuIN6w9kp3FMmb6Dys9uPvDUwK2vIrbRhrrxuuI3gowNOD-cpFcL32Kw)

![Door - main page](https://lh3.googleusercontent.com/9hYRKnVvYPsXnlh4yV_g1yVbunLgttLZQ85RGgat7gL3hQDznxUIzmk52ZydhVbXgPjSl1-F8m-v2dCwrw4qWe8QYI_bDAdnjBXuwqz4TkqHEEoEhtLNujU99v718XACFnzSe6iA34moGQj5FxAVHQ)

### Fechtum - seminars management

![Fechtum - my profile](https://lh4.googleusercontent.com/fq-yfVlyVzCJ3ZnDY8uikZ3uP7C7JuWBdWmIjjJw1Y7pFlm3CAUMy0IbKzWN_SdokiMBgE_OTxZWTfq3q-CJUATywDe-7dguoDgifLPCKbgbbo_u8bZjOtFou55C5_7Rh4SuIzaXtrWJdxritADkew)


# Information Systems

### **Cryonix - information system**

![Cryonix - locations evidence](https://lh4.googleusercontent.com/GGJAfE60uO9Uqxw9M0-UKQPrffhF4KKJzsZXtFV9Fz2UYF5H2tUG9zTqmFLvEifkTBOChc7yxFK74R0FY-ayhc98U8w0SSaHRQCPpkvVnWBm0UBABlVQBUoUoyOSHsyf-Byud7f2H3c5-U7dltBXyA)


# Internal Tools

### Kubernetes Inspector - storage monitoring

![Kubernetes Incpector - storage monitoring](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F9YN4FTgIDcENsLtiUr3R%2FK8sStorageMonitoring.png?alt=media\&token=30a48b51-f478-4a01-bcab-fb0417feffde)

### Itera - registration form

![Taikun - registration form](https://lh6.googleusercontent.com/DXi4NG8eeMLgIcKEiPul1JwVSBK7KBUd7aaCbEPn5k9x3_0_koFUjHJim4AW9ZWfD8BZDKnAfUuY1mp2g2T2iiPti-luekadRCrHdlwvVaYSW5sLUNj4XlPlcw-le3VSG95gwkLFtKKyUM_fk9ou9g)

### The Cloud Provider - certification reminder

<div align="center"><img src="https://lh6.googleusercontent.com/q6g3KlvDn-tXJyigVuS2tAZOFYI7DaqQNOJIgbtR-PnlLGPVJoFr_E2DeJdo7J5GMNmaI0YWa2Bo2tTVXlDQtFfO9HfiaGNpukryT5-wgc3XdJ1z0H0Ihdj5V_md8gnRKrinIbDXcIU3KXqHhU1LoA" alt="Team reminder - my trainings"></div>

![Team reminder - add new training](https://lh5.googleusercontent.com/dVI-d_hHjZeZa8yglpOFzo0Lrz_cvvuQbFSDezBAbHGOxdrN_26o3F_HlzD_iGE9I-Xp5sCw3GN-YtIZqQFNjCKTNL_M3uhV5mQmqy5gXyZKr3spUYqkSfteKPPstmAtEHu8HF6ocrR2Pv9yyOqx2Q)

### Color Picker - pick and color you want

[Read the full tutorial, how to build this app.](/working-with-adapptio/examples/internal-tools/color-picker)

![Color picker - main view](https://lh6.googleusercontent.com/Uwm3cqSsCHe301jbDL8-m6ew9MqtzSmaJQzvLtNo_qYoZeJLoz8hyZaDXgubkgfbIaROm3c96ng0Y43QLjMDFNj19T_YKRmYIdvRmi1mDENWnnsHdMk1jSPBK-PJgk1Xei4bCboR2bjokVnhIRKsZQ)


# Color Picker

### The Goal

Prepare the basic application containing advanced table loading data from the inMemory database, where any single record can be deleted.

For this task, we will use a color picker to send color codes into the inMemory database, in combination with advanced table gathering data.

![](https://lh6.googleusercontent.com/Uwm3cqSsCHe301jbDL8-m6ew9MqtzSmaJQzvLtNo_qYoZeJLoz8hyZaDXgubkgfbIaROm3c96ng0Y43QLjMDFNj19T_YKRmYIdvRmi1mDENWnnsHdMk1jSPBK-PJgk1Xei4bCboR2bjokVnhIRKsZQ)

### What We Are Going to Do

{% tabs %}
{% tab title="Project Structure" %}

* [ ] Integration inMemory DB\[`DB.Colors`]

* [ ] Action\[`UpsertColor`]

* [ ] Action\[`GetColors`]

* [ ] Action\[`DeleteColor`]

* [ ] Data Variable\[`colors`]

* [ ] View\[colorTable]
  * [ ] Sidebar Layout\[`sidebarLayout`]
  * [ ] Content(*content*)
    * [ ] Container\[`cntTable`]
      * [ ] Advanced Table\[`colorTable`]
        * [ ] Column1 -> Text\[`tblName`]
        * [ ] Column2 -> Icon\[`tblIcon`]
        * [ ] Column3 -> Property Item\[`tblProperty`]
        * [ ] Column4 -> Icon\[`tblHighlight`]
        * [ ] Column5 -> Button\[`btnDelete`]
  * [ ] Content(*sidebar*)
    * [ ] Box\[`sidebarBox`]
      * [ ] Color\[`fldColor`]
      * [ ] Text  Input\[`fldName`]
      * [ ] Button\[`btnSubmit`]
        {% endtab %}

{% tab title="View\[colorTable]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FY5UOGjjIpQyQpG1i36dw%2Fimage.png?alt=media\&token=cce30168-a883-4338-8bd1-f8fdd318419f)
{% endtab %}
{% endtabs %}

### 1. Create an application layout

The sidebar layout looks to fit our needs. Let's start with the basic layout preparation.

1. Create a new **View** and name it `colorTable`.
2. Place in a **Sidebar Layout**, set up its *ID* -> `sidebarLayout`, and *Item Flex* -> `Stretch`
3. Into the C*ontent* of the `sidebarLayout` put a **Container**, name it `contTable`, and set *Padding* -> `Wide`
4. Into the *Sidebar* of the `sidebarLayout` put a new **Box** and configure its property as follows: *ID* -> `sidebarBox`; *Background* -> `WHITE`; *Padding* -> `Wide`; *Spacing* -> `Medium`; *Item Flex* -> `Stretch`

### 2. Place and Configure Components in Sidebar

The sidebar panel contains a color picker where each picked color has its name. Submit button will send the configuration to our inMemory database, if both values are set up; we will assign submit action later.

1. A **Color** component will be placed first, carrying *ID* -> `fldColor`, and *Label Value* -> "`Choose color`"; *Label Text Style* -> `Bold`
2. Put under a **Text Input**, name it `fldName`, and set up as follows: *Placeholder* -> "`name...`"; *Label Value* -> "`Name`"; *Label Text Style* -> `Bold`; *Validation Required* -> `true`
3. A Submit **Button** will follow, with set up properties: *ID* -> `btnSubmit`; *Value* -> "`Save color`"
   1. *State Enabled* -> ƒx(`fldName.value != "" && fldColor.value != ""`)

### 3. Prepare an Advanced Table

Let's prepare an advanced table as an essential part of our layout. Binding its dynamical values will be done later.

1. Place an **Advanced Table** into `contTable`, name it `colorTable`,  *Spacing*-> `Narrow`, and set up the following properties.
   1. Add a *Name* column call its *Title text* -> "`Name`"&#x20;
   2. Add a *Color* column call its *Title text* -> "`Color`"; *Horizontal Alignment* -> `Left`; *Width* -> `50px`&#x20;
   3. Add a *Code* column call its *Title text* -> "`Code`"; *Horizontal Alignment* -> `Left`; *Width* -> `25%`&#x20;
   4. Add a fourth column and leave its *Title text* `blank`; *Horizontal Alignment* -> `Left`; *Width* -> `100px`&#x20;
   5. Add a fifth column and leave its *Title text* `blank`; *Horizontal Alignment* -> `Right`; *Width* -> `100px`&#x20;
2. Into the `Name` column put a **Text** component call it *`tblName`*, make it `Bold`, and its *Value* *\*keeps empty for a moment*.
3. The `Color` column will contain an **Icon**, name it `tblIcon`, select from the material library *Name* -> "`mdi/checkbox-blank`", and *Size* -> `Large`; *Foreground* -> *\*will be mapped dynamically later*
4. Into the third `Code` column put a **Property Item** component with copyable items, which is handy in our color case. Name it `tblProperty`, and add an`#1` item with following set up:
   1. &#x20;*Value* -> *\*we will bind it later*; *Text Style* -> `Bold`; *Enable copy button* -> `true`
5. Highlighting **Icon** of the latest added color has *ID* -> `tblHighlight`, and its place in the fifth column; *Name* -> "`mdi/palette`"; *Size* -> `Medium`; *Render* -> *\*will be set up later*
6. The last column belongs to a **Button**, named `btnDelete`. Its empty *Value* -> ""; *Icon Name* -> "`mdi/trash-can-outline`"; *Size* -> `Small`.
   1. *Button Style* -> `Custom`; *Background* -> `White`; *Foreground* -> `Text`; *Border Color* -> `Light_Gray`; *Border Width* -> `1px`; *Border Radius* -> `18px`
   2. *\*Binding with a delete action we will make it later*.

{% tabs %}
{% tab title="Current\[colorTable]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F777sooYiUBH0UJ5wgHtG%2Fimage.png?alt=media\&token=84499a39-0f8e-4620-b3fc-7495c7d2020b)
{% endtab %}

{% tab title="Advanced Table\[contTable]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FemzsWQjqJI5mY7iC2fvF%2Fimage.png?alt=media\&token=e56336ed-f85e-4501-a7c5-5040d45b86d7)
{% endtab %}
{% endtabs %}

### 4. Connecting inMemory Database

Using of inMemory database is the best option for saving temporary values. For our case, saving color codes in incremental order.

1. Create a new Integration by selecting the **inMemory DB** option. Name it `DB.Colors` and set up *Primary Key* -> `color_id`; *Auto Generate* -> `Increment`
2. Saving the integration allows immediate use of internal memory.

### 5. Upserting Color into Memory Database

Let's prepare an action by sending the required color data to the in-memory database by submitting btnSubmit.

1. Create an **Action** and name it `UpsertColor`.
2. Add two Required *Strings,* name it `inpColor`, and `inpName`.
3. Place an **Insert** function from `DB.Colors` Integration panel to your flow canvas and wire it together; *ID* -> `insertDB`
4. There are two ways how to set up *Outgoing parameters* of `insertDB`;
   1. Add two *Key parameters*, name them `color`,  `name`, and its *Values* map dynamically as `ƒx(params.inpColor)`,  `ƒx(params.inpName)`
   2. Bind all parameters as a function map `ƒx{"color" : params.inpColor, "name" : params.inpName}`

{% tabs %}
{% tab title="Flow\[UpsertColor]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FEcb0iwJesPpw0TIiz0Sb%2Fimage.png?alt=media\&token=baaa70ec-d3e0-40a8-b7dc-f710c1d77524)
{% endtab %}

{% tab title="Outline\[UpsertColor]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FNrRKPNAzYjwuB8IbEG3e%2Fimage.png?alt=media\&token=bd68371d-706a-4790-accb-db56615a1750)
{% endtab %}

{% tab title="Key Parameters" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fl3udFYZnMQkJUfr9biwf%2Fimage.png?alt=media\&token=9622e595-833a-41d7-98d1-1c5b87baa47d)
{% endtab %}

{% tab title="Map Parameters" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F8Er3vHPYOCc8tkYzm0oY%2Fimage.png?alt=media\&token=70b6315f-98bf-492b-9eb1-786fdeaf29d0)
{% endtab %}
{% endtabs %}

### 6. Binding Action with the Submit Button

The submitting button must trigger the action of sending data into the in-memory database.

1. Open the `Click` *Event Editor* on the `btnSubmit` and wire together with the following functions:
   1. **Call Action** will be bound together with `UpsertColor` *Action*, and it's input parameters are as follows:
      1. *inpColor* -> `ƒx(fldColor.value)`; *inpName* -> `ƒx(fldName.value)`
   2. **Update State** forcing the View to clear the *Input Value* after submitting by a *Method* -> `fldName.clearValue`

{% tabs %}
{% tab title="Click Event\[btnSubmit]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FQJrdMD5vvA36bhZPkEKV%2Fimage.png?alt=media\&token=fadde690-72a2-415c-8252-a31f5914b689)
{% endtab %}

{% tab title="btnSubmit\[Call Action]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F5Ah0M1MV61BIRJsupzn5%2Fimage.png?alt=media\&token=0120233b-2768-4759-b3cc-02e91776a7bc)
{% endtab %}

{% tab title="btnSubmit\[Update State]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F1VORQdN8Q7oKMwzMtBfQ%2Fimage.png?alt=media\&token=9b5d418d-9acc-4de5-996c-d44dcb865e85)
{% endtab %}
{% endtabs %}

### 7. Loading Colors from Memory Database

Loading all data from the in-memory database to `colors` *Variable* serving as the primary source for Advanced Table.

1. Create an **Action** and call it `GetColors`.
2. Wire together **InMemory DB / Get All** *function* and set up its *ID* -> `data`.
3. Place in a **Transform** function returning `data` from the `GetColors` Action as follows:

```
let data = $.data;    //association with local constant
return data;        //return data constant from the action
```

{% tabs %}
{% tab title="Action\[GetColors]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FCEUA7WuMB2lKpux06t8f%2Fimage.png?alt=media\&token=8ab5ec58-453c-4139-8dd9-70a5fc022fc4)
{% endtab %}

{% tab title="GetColors\[inMemory DB / Get All]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FBaW5m5mFGRRqRw5Wj6AK%2Fimage.png?alt=media\&token=8ca062ae-5e4f-413f-9a99-1b517aaf678b)
{% endtab %}

{% tab title="GetColors\[Fx Transform]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FmkRTjlRPMyjaw8Ebu18C%2Fimage.png?alt=media\&token=60c86124-1be3-476c-bc23-6e51e97346ef)
{% endtab %}
{% endtabs %}

### 8. Associate GetColors with Action Variable

1. Create a new **Action** *Variable* and name it `colors`.
2. Bind the `colors` with the `GetColors` *Action*.

{% tabs %}
{% tab title="Outline\[colors]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F16iyKuI42aB9icrj7MEY%2Fimage.png?alt=media\&token=64335310-69d9-48a0-a8b3-4f09355b2b3c)
{% endtab %}

{% tab title="colors\[Action association]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FPdaP5qT5bYgcJvtvv16v%2Fimage.png?alt=media\&token=4c0052b3-73c3-42d7-9551-20a16109ffc5)
{% endtab %}
{% endtabs %}

### 9. Prepare a DeleteColor Action

Let's prepare to delete action from in-memory in advance. We will bind it with the delete button in the advanced table later.

1. Create a new **Action** and name it `DeleteColor`.
2. Add a new *Parameter*, call it `color_id`, and set up it as a *Number*.
3. Wire together **inMemory DB / Delete** function, where the *Key* value is referencing parameters as follows: `params.color_id`

{% tabs %}
{% tab title="Action\[DeleteColor]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FJGMOZvOnOy7fQo6T8i0j%2Fimage.png?alt=media\&token=9bdc85f4-904f-494c-af4e-4020cc4c325d)
{% endtab %}

{% tab title="DeleteColor\[Parameters]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Ftj0gdgRQOOkef0ALH3v4%2Fimage.png?alt=media\&token=8c15b887-bbc0-467f-b0ed-4cc17940523f)
{% endtab %}

{% tab title="DeleteColor\[InMemory DB / Delete]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F3eKHrVXSvBIEGJZhhIoz%2Fimage.png?alt=media\&token=2a26d034-a1ac-4927-be40-228e87c6ff5d)
{% endtab %}
{% endtabs %}

### 10. Finalize the colorTable

Finally, we have to bind our actions with `colorTable`.

1. Select `tblName` Text component and bind its *Value* -> `item.name`.
2. Same do for the tblIcon and set up Foreground -> `item.color`.
3. Bind the `#1` item of the `tblProperty` *Value* -> `item.color`.
4. `tblHighlight` *Visibility Render* -> `ƒx(item.color == fldColor.value)`
5. `btnDelete` on *Click* Event set up as follows:
   1. Place in a **Call Action**, bind it with `DeleteColor`, and wire it together; as a *Parameter color\_id* set up -> `item.color_id`.
   2. As a second component put in **Update State** with *Method* -> `colors.reload`

{% tabs %}
{% tab title="Click Event\[btnDelete]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FsKb9Vo0heKkquKx9rgRa%2Fimage.png?alt=media\&token=b9bfd34a-7092-49db-a980-25d6b03dc93b)
{% endtab %}

{% tab title="btnDelete\[Call Action]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fah3RjBXxksuVwE7lknrl%2Fimage.png?alt=media\&token=1c304efa-4d32-4432-93d8-9de513f343ee)
{% endtab %}

{% tab title="btnDelete\[Update State]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FJUPIogfPZWG7LTTcDHaa%2Fimage.png?alt=media\&token=fd616e21-6fd3-4ba4-9c7f-30bd25cb9d23)
{% endtab %}
{% endtabs %}

Update State of the`colors.reload` has to be also added with `btnSubmit` *Event*.

1. Open the `btnSubmit` *Event*, add and wire together **Update State** with *Method* -> `colors.reload`.

{% tabs %}
{% tab title="btnSubmit\[Upgrade Click Event]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FZ0rrzTAFhvBRA55otFkq%2Fimage.png?alt=media\&token=ee0635c6-8078-40e0-b01c-49c5b5fb5a51)
{% endtab %}

{% tab title="btnSubmit\[Update State]" %}
![](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FIFV5gTZJrTiA37MpAOn5%2Fimage.png?alt=media\&token=5b40ebe6-3939-4087-837d-cddd817506c2)
{% endtab %}
{% endtabs %}

We are done! Our advanced table with a bound in-memory database has to be working.


# IoT Applications

### Netio - remote device control system

![Netio - socket control panel](https://lh6.googleusercontent.com/MUc9wAMbMwYWaRyA2i_hIpQ42bz0aD6K8cTCQeNTeCTn1ZU3p08SEQ6VE5M_S-R9LTyNDNMDEgGxy0nHphWWewlWzJE2lQC_ZRqcxZSuhKlgfgodNONktvulVgy3rHJLWl_ycs1dIZncbHUPiJLbbg)

### Svendborg Brakes - IoT brakes monitoring

![Svendorg Brakes - overview of mining machine](https://lh6.googleusercontent.com/TsvfzlWi5KvbB_uQ0zetuKEJ02EnO5AwvyYZEpELTrTsh_zcVsr3AepNa35lCD0kmlKrbzoG2JfzXyx18mO2GMpHirn4NrRhC5OWzp-I_sCTn-qTGN8Z2GAExP19FF79_dv-Wshwx-NvzS3uJcR--g)

### I Love Hummus - cooling boxes monitoring

![I Love Hummus - temerature monitoring](https://lh4.googleusercontent.com/WBhSriTRn7sZMgUpjlfM5k28udjjPKBek5sM-6a3Syzgcek1rEIaS3wWcRlmLXUjXHNaKdPP_Y_Dg1Rt1dETFMNfovsYeKufIhwt86R_8yQAgSGxCnAbyuP9ZaHhcZxDhFyLVxJxtEn2UVlkioLadA)

### Gornicky - cooling boxes monitoring

![Gornicky - temperature monitoring](https://lh6.googleusercontent.com/Dwz5bw3Tc0m19_MQmamLkQge45Vk-Mov4JHag-ayy_bhrxVqVHtFA9eDa_9w68t6CFUH5V3p_uhO6v3KKaLvD-X77esqKIa-RqEqJnL-6zp640_4_rIm0FLsN78qlkVNymzNWx7s2ymmjSTzf63lGA)

### **Česká spořitelna - boardroom monitoring**

![Česká spořitelna - meeting room occupancy statistics](https://lh6.googleusercontent.com/dH7NAUQzWCPweEJahQp40Y-eZOCC5dlVKRmmx2ia8P6EA-MDOOxj1gUdYkdHVHOObv28GHep8a-kC47w08mcdLff5wVzVO3cKJPfGg8BAhIaNKLzpzukZQveAiIp63l5ThhlQILDlsGLMcqzRFe00g)

### Flowee - smart IoT billboard

![Flowee - environment monitoring](https://lh3.googleusercontent.com/qTfgE3GpXh4UAFa5GiXlSwjBNQ66Wk3leI5ScMYS9L3AsY8AoaxJ65N-7tojcFcGE1EbLcOwgzdp9QaeQnDZuUAuf1BFM9DlzknI-DPigyiSl4p7UzFZy6jDmSq5lDmI8WYVjOFhFwpsImgttgOppA)


# Smart Portals

### Smart home portal

![Smart Home Portal - indoor and outdoor environment](https://lh5.googleusercontent.com/r4slVCTdY3FLCoEpGBS8f9n4RyH1-8vpsjTua7w5lV0jVflabA_6-u5FpUgxTSk_wamaBmn1g12P5bHEgqQXq7VTHcO5YXPkHL2--EexgWeY7zbeRw_yUCYPCjNDRky5bjMkdlnvoTvtwtm0-zDlLA)

### Písek - smart city portal

![Smart City Portal - devices overview](https://lh3.googleusercontent.com/aWC6I9n2a4u-c-maAAnaOWUovzsUySte5KEDRMYSYxqhv5ATrQLK-btB6h9rlgfDIqt_oJ18N_02-bEQUpo3Cn63tPCLO9cH7Xs3nQ2wvEmjsJEiTkun85mrZ1oSiDawhW_DItPiTyPCVqvhvr06DQ)

### České Budějovice - smart city portal

![Smart City Portal - energy monitoring](https://lh6.googleusercontent.com/Z1e4MvblXznE7nexU-9zlrRd_sQTapnCo33rKoTdrsLuYih4UP59TB6Uo5j65OWyH3oQnmn0aWsEJycfDQbKWnMass7-JUbuO29E_JinujarPhL1exspi-LlVORGlPbo2YiiDrkjoKxq3ePVosoHlw)


# Analytics & Calculators

### Epidemic spread simulator

![Epidemic simulation](https://lh6.googleusercontent.com/oZ4nMbnwIGLBiEQPr-8Dm1zEkL7lHjwX6CuSUGkDr3JJneDWSVSVKP4iWKbafqqIR8NHa8qo7mctmk-srXwvdgtqldnSIai8z1Wh9QQ8jlb9OJfSjsbmc3tCES_rAlFqHYIaaZrBvAQlHv8RzuTKpQ)

### Altra Motion - device behaviour simulator&#x20;

![Altra Motion - digital twin](https://lh3.googleusercontent.com/qmNUMnQT42ZcS2_uNtHNZH0YgZzyxao8UbGivFYH2X9-nPAkn4BHoODKAZ5JkifcmK65ZPV7R_UdCoO9snHVmFMBrjPiHMqBYrA_mQgQhYZFTqz8fqHBpIrAUAB1tPIBHOkzpshFhrSG3wGGPu8yfg)


# Statistics & Monitoring Panels

### Car Diagnostics

![Car Diagnostics - overview of operating parameters](https://lh3.googleusercontent.com/Z-tKNKIyK9XBjPPqluO6JQiuswNlyJWd1P70E79zaj4J21s1ArTqIsCaS1n41lUjUrZS9rIG-1dptyVEaUWr7AoiCsIcMEpfP3ww7cOoQprY-3UYfBovu2k6nAAFnQkspYNEhi6LSJkQSv0PXnFFBw)

### Remote Device Maintenance

![Remote Device Management - devices overview](https://lh5.googleusercontent.com/4cCEAieUyUGrT07fEFgVsAGC2VyCXkkONOMWNhGFBfHelakUvfTGrVTdvKT8yb3CnCHNvjr1EhUVrVA-gNJ4xVyjJLUxVXBzFOFKu882ia3CGCzyfmEQqCKIG7wJtD-szYBS7E4IvYa51ruRgmOKjQ)


# API Data Visualization

### Mock API Generator

![Mock API Generator settings](https://lh4.googleusercontent.com/GZ2BTIKVehyTGGFgagT2wzSjeOy89p1RfkGqeQf9hrnpOUMDJH63v2ZkRzSk81b_VfZCV8TvTg21j4Wdef7zUEUYtwJ-TCLUPkc6qjkZ-i2ZvgQYjdYjwpclVsa2kKT_usRVdo4MEQAQcU9JplmXZw)


# Simple Games

### Neit - team building pexeso game

![Team Building - pexeso game](https://lh3.googleusercontent.com/rLI6y3_NiGlVzeD_2I2h5nRaKYOFCExfp_XzZYGieKuZOJlY0a52v9KIFAd22I_nzwQnC5ao2Sqh_cCvBru09BCT8KG3LF7mdcfRodBCSGWpkEIjCIqVoIoAYhjhZzsj0yV25IjJ2PaDUj6oYcWa9g)

### The Adapptio Adventure

![The Adapptio Adventure - game map](https://lh3.googleusercontent.com/6ss9wCcSWgrWP1Ut86LXetrIEG51WaHA5WLDg80LFpHNAddfz70d92meYbtpsVSYPsboUmDZIgO2MURBQF7mmRqjYYYa002YnIM50_tMAcNhwwd0Rj9JFwiARMohIAA0g3CJGrNPQ3xtYLjhNRgOUg)


# Cloud Hosted

More about deploying Adapptio in Adapptio cloud.

Adapptio supports cloud hosting in private cloud located in data center in Písek city, Czech Republic.

Our cloud is based on OpenStack and Kubernetes to provide professional cloud services to you.

To deploy application into the Adapptio cloud, open editor, click Deploy in right top corner to open deployment dialog, check your errors, select environment and click Deploy.

<figure><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FIOq70npPnHZMqrnZLsTR%2Fimage.png?alt=media&amp;token=1562750b-0bea-4189-ab40-5d46e3a54033" alt=""><figcaption></figcaption></figure>


# Self Hosted

More about deploying Adapptio on your own infrastructure.

First you need to obtain token allows you to access Adapptio repository. For this, please, contact us.

### Building image with GitLab CI/CD pipeline

#### Create new repositry

Once you have created a new repository, you also need to add several variables to your pipeline. Go to the CI/CD Gitlab settings (Settings -> CI/CD -> Variables) and add:

1. ARTIFACTS\_LOGIN = \<your-app-id>
2. ARTIFACTS\_TOKEN = \<obtained-token>

#### Dockerfile

Add to your repository this dockerfile.

{% code title="prod.Dockerfile" lineNumbers="true" %}

```docker
ARG BASE_TAG

FROM ${BASE_IMAGE}:${BASE_TAG} as runtime

ARG BLUEPRINTS_DIR

# add blueprints
RUN rm -rf ./repo
ADD ${BLUEPRINTS_DIR} ./repo

```

{% endcode %}

#### CI/CD pipeline

And finaly add the CI/CD files and fill all the variables in the `.param.yaml` and `.gitlab-ci.yaml` file (section between lines 16 and 24).

{% code title=".params.yaml" lineNumbers="true" %}

```yaml
variables:
  # Change this to update Adapptio runtime image
  # Example "v9597de1b-master"
  BASE_TAG: "<adapptio-image-version>"
  # Change this to update application version
  # Example: "v3"
  BLUEPRINT_TAG: "<application-version>"
```

{% endcode %}

{% code title=".gitlab-ci.yml" lineNumbers="true" %}

```yaml
 include: ".params.yaml"
 
 services:
   - docker:20.10.2-dind

stages:
  - download-blueprints
  - build-image

variables:
  IMAGE_NAME: ${CI_REGISTRY}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}
  IMAGE_TAG: v${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_REF_SLUG}
  BASE_IMAGE: "artifacts.adapptio.app:5000/adapptio/hae/app"
  REPO_BASE_URL: "https://artifacts.adapptio.app:5001/artifacts"
  
  # ---
  # SETUP THIS VARIABLES
  # Set UUID of your organization
  # Example: "b9fbdcb2-fe44-45a6-836e-585715b3457a"
  REPO_ORG_ID: "<your-org-id>"
  # Set UUID of your application
  # Example: "83110cc7-ea98-4a8f-a2ef-68f9d6fe1b27"
  REPO_APP_ID: "<your-app-id>"
  # ---
  
download-blueprints:
  stage: download-blueprints
  image:
    name: ubuntu:latest
  script:
    - apt-get update && apt-get -y install wget
    - |
      wget \
        --user="${ARTIFACTS_LOGIN}" \
        --password="${ARTIFACTS_TOKEN}" \
        -O ./blueprints.tar.gz \
        ${REPO_BASE_URL}/${REPO_ORG_ID}/${REPO_APP_ID}/${BLUEPRINT_TAG}.tar.gz
    - tar -xf ./blueprints.tar.gz
  artifacts:
    paths:
      - ./${REPO_APP_ID}
    expire_in: 1 hour

build-image:
  stage: build-image
  image:
    name: gcr.io/kaniko-project/executor:v1.9.0-debug
    entrypoint: [""]
  before_script:
    - echo "Building ${IMAGE_NAME}:${IMAGE_TAG}"
    - echo -n ${IMAGE_TAG} > version
    - mkdir -p /kaniko/.docker
    - |
      echo "{ \"auths\": { \"$CI_REGISTRY\": { \"username\": \"${CI_REGISTRY_USER}\", \"password\": \"${CI_REGISTRY_PASSWORD}\" }, \"artifacts.adapptio.app:5000\": { \"username\": \"${ARTIFACTS_LOGIN}\", \"password\": \"${ARTIFACTS_TOKEN}\" }} }" > /kaniko/.docker/config.json
  script:
    - |
      /kaniko/executor  --context ${CI_PROJECT_DIR} \
                        --dockerfile ${CI_PROJECT_DIR}/prod.Dockerfile \
                        --destination ${IMAGE_NAME}:${IMAGE_TAG} \
                        --build-arg BASE_IMAGE="${BASE_IMAGE}" \
                        --build-arg BASE_TAG="${BASE_TAG}" \
                        --build-arg BLUEPRINTS_DIR="./${REPO_APP_ID}"
```

{% endcode %}

### Testing deployment using Docker compose

Create docker compose file in a workspace on your computer.

{% code title="docker-compose.yaml" lineNumbers="true" %}

```yaml
services:
  adapptio:
    image: "registry.gitlab.com/<your-gitlab-project>:<app-image-version>"
    ports:
      - "8080:8080"
    environment:
      - NODE_ENV=production
      - APP_MANIFEST_PATH=/app/hae-bld-app/repo
      - APP_ID=<your-application-id>
      - APP_ENV_ID=<your-application-environment-id>
      - APP_NAME=<application-name>
      - APP_URL=localhost:8080
      - APP_URL_PROTOCOL=<http|https>
      - SESSION_SECRET=<session-secret>
      - ...<YOUR_OWN_ENV_VARS>
```

{% endcode %}

Run docker and type:

```
cd <your-workspace-folder>
docker-compose up
```

The application should be available at URL:

```
https://localhost:8080
```


# Components List

The components are essential building blocks helping to design applications fast and effectively. Each has its unique ID and properties defined by constant or bound dynamically.

### Layout <a href="#i3enk7nstw48" id="i3enk7nstw48"></a>

Layout components are the basic building blocks superior to any other placed elements. The charting layout defines other components' placement and prepares the canvas work field for responsibility at the different devices.

![](https://lh3.googleusercontent.com/u0Yrmdeaq7rZC5t-0ZjRr6ULCqFL_z1Rr7syd4Rnm7_p29_v1mnTt3U25HPoekHBpvZO_dWxqkaQ1wyjffWOsObHW86kFxQDWTqqrac-4sisV4kLSV_YP9aa4L-EUeDHnXtDdFy_)![](https://lh6.googleusercontent.com/5MHDqSp-lLBRzTfK3Z631hcs69k2JeludozGQJAJaON7BQQ-R9v3XCFS-6YHvwI-LHCpX39-luaocki0adH_DGfXvO_XcDIjwsmsuVOdvDzhG2_aaY-bqD0RpQ_FRy8KHFDojKVY)![](https://lh5.googleusercontent.com/ocRskiXeeyX9tasdUnVoUjwNE1_VYrZhmMnElS9rSZH2OEKYRCsroVeMl3Vg95hOxiOOQKASWf1ydqOVRDH_EVWBYr8-meicREEbGpr2MYKFH0h3utKX_ikhEcujKjkLMMKL0deO)![](https://lh3.googleusercontent.com/K7rqKtz2VP8WPi0qFQd_5f8qq4oGx9aSrH6SY5SRZHygxIN_qFOhYjNBA-5Nz90WW9De1tUVye_kVze8dRPkGHbj51scaZqYQGQyU5SEYKsrWUW4edGg2DXKe3te06_Bj4TftIbu)![](https://lh6.googleusercontent.com/yc_jV45UagLkyouwaki9ihtl77Bxfw1QMYtjCVS2_-gcbRN1hUUluAdwvtdHn_V7ETRRb1tJnz5-MZUYJ26wYML0L_-zC5PAJ6j-r78MnLI7RtjmTbOxwNXswccY9rEtENDmqDJO)![](https://lh5.googleusercontent.com/U1aT00k8k8rvWLMMWIql3US_TzfSRnSLF6vjGVIgMiSyZVtd-5qEAxv6Z9VBMGhXotyrIuNhilA7UF0NWXTxTb7QHe6HDR3nSPXwCReWfVS_8FMr3ZzvKrehB-0HMt8vU4JADdV1)

### Logic <a href="#k64ua1zfpp35" id="k64ua1zfpp35"></a>

Logic components are mostly condition-oriented elements, switching their states depending on incoming variables and, for example, changing different content in the same view or multiplication of elements due to other conditions.

### Navigation <a href="#id-2x875yrg4or0" id="id-2x875yrg4or0"></a>

Navigation components help make menus, and tabs allow for the creation of pagination and tree views.

### Forms <a href="#id-4ko7hqnam6tm" id="id-4ko7hqnam6tm"></a>

Components used to build and design forms, including editable fields, checkboxes, text areas, etc. Each form component has to be placed into a superior layout with the setup role on the form. That's how to assign submitting forms by pressing the enter key. Component executing further action has to set role on the submit.

<div align="left"><img src="https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F0myuMatuqboZc0m2Lmtf%2Fimage.png?alt=media&amp;token=6b6bb179-f153-442e-b531-12225d3678b8" alt="Setting form role for a superior layout component."></div>

![](https://lh6.googleusercontent.com/W06_9G-iUcNxoQbijoobU16l4a6OI-WbY_w6FEl2ye_l_Bjt3D7M_NrihLTfiTEZ7p7kggQrR-0es_AKpZE691G9VtEp75ZOYPBT9U6TRvUicbS4RlMUUQYWs9DeIPL9wjnYE1s9)![](https://lh3.googleusercontent.com/9BOGFyGFeZXV4NbIJ1z4CEkz4XA1vnZ8JmC4xb3KlFwtQwBQjkHf9sFd7zUyePn5lQqbaspiMjW6c4DrYaWZ9O1mA-ae9q3ce7FBdSyKzKuiF0dG2Hbxp2TbQTpgZMtrtHR1B7CB)![](https://lh4.googleusercontent.com/LxGFdqn8JOspbn_4gIcUbWEg-hKSCcpImCZ8PdfexrpvcnSysS2QxUrEmT98F7bM4Ao3AOLxXHWt_sze_sHDBvcUGq4YwhlCMHyN_oAVAk9PQphj00-V68NSVNcXkHyIPU0fDTZa)![](https://lh6.googleusercontent.com/L603XaNlky5A2-O01Uv2R14pYoucH_jBFptSjCfPhyCb8UQI3D47AoGX_z9WOTiPPb2tqUOXEoFkcuwNwkYVBCvhm0zLLdsZZZLeCRE2q0UDNhybUZ3jNyDeuOEtgn6U_JdOc6FO)![](https://lh4.googleusercontent.com/KIkTGawRKnOjtI8IKuSAO-ZMqZ9DOZMpJidHJd5aU6MwtXifMh75BwS3Oom0oA02kb0UOEDBBvHtw49gY2RFbNV4WjhzId86aljW4WEGP1ep8KP-s5U7lle3mwM-y3VFfIecz8Cr)![](https://lh6.googleusercontent.com/VzOl74Q4VFI6KQ2fGX6hHTE5n5L7hAIbusu1KS1rTxFObrKxryARh8U1pYZs8twBQ-aP25-axAz0DkdL8covq2Q7ZOQiFjt9in8iMDqH_87gkadr4MTs1bcO0xRfheHxgDOKC2W_)

### Content <a href="#rl2f1fmaa6c" id="rl2f1fmaa6c"></a>

Content class is the most comprehensive part of all components, containing work with text, buttons, images, and other components carrying visual output.

### Charts <a href="#n4owan6bjy0a" id="n4owan6bjy0a"></a>

Chart components allow us to represent visual output bound with specific data sources.


# Application Header

![](https://lh3.googleusercontent.com/WqRNZlC0Gt9fVc8fZx3ObqJR09Vp0T-_A2e6rQPc10rgfDhApuQ_3SO9ot-pHBcOnMSVP1fCEChU4Qkca8j6eVy4V5d37Cy7gNd_6OJwB-ubbJcRMzoK8yfj9gJd4PlwB2Q4scM_)

### Component description

The header has permanently fixed the top position, taking advantage of introductory content or a set of navigational links.

### Component example

![Classical use of the Application Header](https://lh5.googleusercontent.com/r_9NcHoRW5bJEhA7CU_iMcav3wof_HtGOUbuS6kUukUgAq79worG67bUEwZwGpBh6hXdw2URaDzoB4OdNK3W-dy3BjXL0IN-Gvsz4Kehw1tX-m9gZFbH4Eq_2BG-q9r1JgccnlY3)

### Component properties

{% hint style="info" %}
Under construction
{% endhint %}


# Box

![](https://lh4.googleusercontent.com/ludhDreAdE-ua4aWgGxB34clyIeljxBffNAyeXS0McsOpQdBkeKAt0EP8lG3GlkAOrDUOohsbhYE3eWSKeLQiMcY6fFnQkAW86n81ETC19S89daSf17_THhMEGJfkQfSfh4d9r94)

### Component description

The Box is superior to any other child components and sorting them up by horizontal or vertical flow. Whole content elements can inherit surround padding and the spacing ratio between each other. The same applies to height and width properties.

There are just slight differences between container and box components. The box should have a visible background setting, and the container doesn't. In the logic of basic app construction, the container takes less computing time than the box. The container should replace a box component with a transparent or inherited background.

### Component example

![Example of the basic Box](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FfIAQFXJWsbQ1WpbRl7of%2Fimage.png?alt=media\&token=adaf7fcc-da3c-4cea-9237-e673bff56129)

### Component properties

{% hint style="info" %}
Under construction
{% endhint %}


# Container

![](https://lh5.googleusercontent.com/w2wmO8ynvaz2lT2B5Vs5Xp1ZvqhYRpVhdpHPvA-uOHqDuxzd2Nv5vss1ZBTz8A7o78ikAtDRR6AIn1AssRIG7RKFeW-jlbMFot-Jnv-vo2uBEWcNQLUEMYpfCna-ke1QafUUWB6z)

### Component description

The Container is superior to any other child components and sorting them up by horizontal or vertical flow. Whole content elements can inherit surround padding and the spacing ratio between each other. The same applies to height and width properties.

### Component example

![Example of the basic container](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F8HLDjhNLhULBYrNxeDmS%2Fimage.png?alt=media\&token=28a10919-87f9-4f85-a775-764ac8d943ca)

### Component properties

{% hint style="info" %}
Under construction
{% endhint %}


# Grid

![](https://lh5.googleusercontent.com/sERVWev6swrGyQARJ73YRaBilSkhOlnzzlJOrIOTx7hTYX3g47J5lze34vHv1SjlPABsvDgZHOly0fH6rJQEhVGR1K-E54kWBEEc92FCVU0iRj6kSuSgWEQ_UJHs1RnE3h1IaFmI)

### Component description

Grid is taking advantage of the axis-oriented canvas field, where the size and position of the child components are strictly dependent on the Grid size setup. The number of columns gives the Grid's a fixed ratio width. The practical use for the Grid is an application with a lot of sorted components—for example, forms.

### Component example

![Example of the basic Grid](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FQrAMCLfLZWuV7hDp708f%2Fimage.png?alt=media\&token=627bddd6-827a-4a27-8fbe-8aa5775a8731)

### Component properties

{% hint style="info" %}
Under construction
{% endhint %}


# Sidebar Layout

![](https://lh6.googleusercontent.com/os4nNJXEVDf8SHzMdd49yLm7O8D3_IWZnuEQJqSi76XEdAa1Sri2jasMgN9SBORWpg0JZMyKU2gBbgM6g0MnUBA2xpwNjz1TkGlqJaoGh6A7ZJcT6jkegiCk_Kx1kEPLyL30cyoq)

### Component description

Sidebar layout takes advantage of views, where side menu, navigation, or other information content is required. It's divided into the main content container, and sidebar content, with a left or right position setting.

### Component example

![Classical use of the left oriented Sidebar Layout.](https://lh5.googleusercontent.com/uuB7xMuh7GVXckifL0lUnbfz-qO_DS6pexweYuCQhWVyPb2h71gRiumCsNUDlxdUZC9T2hqsTXkBpRxCbeZMtpNObSiKYoSFGvu6g1nBPAteJf8Ynuj9q_KvYxfkL057ysoNEu01)

### Component properties

{% hint style="info" %}
Under construction
{% endhint %}


# View

![](https://lh4.googleusercontent.com/vUuL036q15n9gGbnMdN9fq-j9utofxKFIhN4UjfMoWi0YcOf6WeuRED9jwJ6xlid0DwNTJPLKyafkvdSo6l3_26rhbcPpwYF1ue5caRpkuTMp2CuajWDklMIut-tAF5zo3Rl-SR-)

### Component description

The view is the essential canvas work field used for designing new or nested pages, and it's superior to any other elements. Any view can be a part of another view, and its content has to be bound with the existing one.

### Component example

![Example of included blank View into another one.](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FBF2pCDALATbInMfP66MV%2Fimage.png?alt=media\&token=9f7065ab-5102-479a-982b-a27aafc76411)

### Component properties

{% hint style="info" %}
Under construction
{% endhint %}


# Text Input

![](https://lh6.googleusercontent.com/vnqQ9Wm7EfsuXwAd11eRpMJdS-uObLnxzdFTUYgrNonU4IDHNxqKEWrbNWThDfL-T0F3Qz1ZnmJp38HfN9q27yTfAtboirG67Uk98ZwsE7eYLC9F3jY3yZjo2bI9CYB3nsvVzk90)

### Component description

Text input belongs to the most used components in designing forms. Its input is a string value that can be parsed and validated.

### Component example

![Typical use of rounded corners Text Input.](https://lh3.googleusercontent.com/7SqQp8PHtJpI9Ens69l9uNxcIYnCIjzK_i8aC4eKosWYYMVSVHMInzlUkAf4hG3vmk-dPT4fR6yYft2lyC_g3QGTA2hYzHZiBNr5F7pctoEgkd87lLGzhJdNkWk9pSfxQKz21WXq)

### Component properties

{% hint style="info" %}
Under construction
{% endhint %}


# Number

![](https://lh5.googleusercontent.com/JtVM4ky7ceys13eFBAjnMtWLsY3o04SOIRqG_lrKyvirCT0xYKxzAQ0ddi9Aq3hAFth9oqZINWm8E8DwYn9RlCyn4qNkXtv7nod51pb2pHdEEzDnIvHBbImAYGHI4eZnoT957xuA)

### Component description

In contrast with the Text input component, where you can type any string, the Number field accepts only numeral figures.

### Component example

![Typical use of rounded border Number field.](https://lh3.googleusercontent.com/ZmAPuQR3bC8znZ7lCyJZY-WuBsu0OPgz5-GNtoVRopE4U5X15y_ZwHy3MT9veyJwn2MlPXYNyXukU7ur1rZXUSJyOtJasoBxjF4EStrIit0AGtBUnqqV4bCnIrx7l0FsCxD66nzj)

### Component properties

{% hint style="info" %}
Under construction
{% endhint %}


# Checkbox

![](https://lh6.googleusercontent.com/4gpdixo6Q2FP4Zphm2HrvheENaYpzWzi1hlxegTQ-y6hdPB1eaJNTJm-0Z2XUEfjs58QCkaJ9f5rd88R98sKDfiI_kzBIG_UA6X1Xwcw30IaZjklmc97CKgEHJ3lzxBMMKy4Lj1o)

### Component description

Checkboxes allow the user to select one or more items from a set and can be used to turn an option on or off.

### Component example

![Set of few Checkboxes.](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2FnotLm8BqtpDNLOqg3V2r%2Fimage.png?alt=media\&token=33db3ac0-44b8-439a-933c-457b54cc5c97)

### Component properties

{% hint style="info" %}
Under construction
{% endhint %}


# Option

![](https://lh6.googleusercontent.com/21jpfMpcFAZ1_0cKxu8pKxT2Q-KDRzAxjuDOzBZav7sa2RlGrhP24q951i7isOvJpTzxnsWC_2z5biUPx-OitUGi_PzRpUKWN-lQFh3HjGolwnNwzBV5wsOomaooZNSn2Fzk7iTi)

### Component description

The Options field allows the switch between redefined values.

### Component example

![Classic drop down Option menu.](https://lh4.googleusercontent.com/NYLc4uY0oObqLB-X5Zvt7FViykQtQJn1MfRiQrbRKDUp_M8U-6TrzmVNPtF3rHf5PFmqFPZovGRxaMY-BBNXGhrGnWE852pXEiS-La0IKkV9BdMbOHarKUsa-cafDbqBkOH7Hhl5)

### Component properties

{% hint style="info" %}
Under construction
{% endhint %}


# Date and Time

![](https://lh6.googleusercontent.com/6IsMIhkQ7cfDYuxNWJWiljJzGqTkRGZRhJ_Tx10Mwz05K7vCfi2OS7OV_fJMrAiWXO3xfnwhP4kPpuOceHSGBVtT7h0A2hLlVGCFbyyrH60r7R8_YCSMM8pNcrb8p1zxlcnZd24J)

### Component description

The Date and Time field allows to pick up the desired timestamp.

### Component example

![Date and Time picker.](https://lh4.googleusercontent.com/AIQv1ibhaytYMUBb2LfD4_4CGNaFK7t-395wXLyrRB-bNWXNJdtzfiqV8MWIQlcGqDXz3YVTPzeGtJVQdfRwJNUJKl-dq4RbAShpaXgdECNr5PaHUYRBb6-5uWbh8RXALwjGiUhg)

### Component properties

{% hint style="info" %}
Under construction
{% endhint %}


# File Upload

![](https://lh5.googleusercontent.com/bXfZwdk8bqQP8JW8nhZU30daXYZhCylunHu-vm5Oy_PmHIJ2QCN4UFhQ1XHYHOgJ-D-qGdayS7jBO7xfMj2z2CqnVuGVLpjkNjrlmfRAisdxESbQqC6Vbbvjlmm-r2BZaQTFpEPv)

### Component description

The File upload allows you to upload any required files to a specific data storage by drag and drop or click and select.

### Component example

![File upload with list view setting.](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2F1OQqU4BzbQ75OhWdf8Iq%2Fimage.png?alt=media\&token=b47b1a14-1b4a-41f8-a561-46b31cbdd2a0)

### Component properties

{% hint style="info" %}
Under construction
{% endhint %}


# Properties

Each component has its properties that can be set up as constant values or bound dynamically. Switching between value types is done by clicking on the function icon on the right side of the inspector panel.

![Text value is referencing to a existing variable.](https://4190342052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MjiITn8B0C9eJvihABh%2Fuploads%2Fey05ASbvjTorYbpwacNS%2Fimage.png?alt=media\&token=ecea3bdd-c631-4a4e-b46e-a7c00f23ff7e)


# ACCEPT

String Value Types

### Property description

Specifying file type for uploading by a group or an extension is set up by accepting attributes, where an empty default value allows any file.

<div align="left"><img src="https://lh5.googleusercontent.com/9uqwO5RLNpOcHAvt-m_0MGxGVMnFyR53M8dCwdxQE2bobygMwwQYI9HiBGjmYtuUYosaINfNsdDLNpK6uT2Gh0eyhTk7vm3CKL5rIkgMCgvsyVI8xJj2n6WDcav1GljCpGbUtr8l" alt="Accept image files only"></div>

<div align="left"><img src="https://lh4.googleusercontent.com/wyV-VB-FRzM2Sy6Pj5n2JhiMq7ygtjEPSPRg3hUZRIni3gALizaid7pSVKS3sCgdubjHVfDSDK3QsL4zul0GAW53u89aF2CLCf-1sLBtZYQq1Jx4fEzkX9DzosGYJ3GYvpkwy1Qa" alt="ƒx (String): Accept files defines by string value types"></div>

<div align="left"><img src="https://lh6.googleusercontent.com/1TxgDKe0ByVJycX0SoN73TAzI__80j9-ntdsIZh07tjd4pkkRd8iGF6aOpoBZyFAIK9kQ5pd_7I1U1VTuAxf7Dj1mUPLZ4Y9VeDUTuKbKy6m0Es4yVtYHN1yP7ezpaLe4NNKKGgW" alt="ƒx (String valuetypes): file_extension|audio/|video/|image/*|media_type"></div>

### State

Accept attributes are limiting the acceptance of filetypes.

### Value type

<https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation/List_of_default_Accept_values>

### Availability

[File Upload](/reference-guide/components-list/file-upload)


# CUSTOM PLACEHOLDER

String

### Property description

Custom placeholder overwriting an existing default string value with the possibility of customization for touch devices.

<div align="left"><img src="https://lh5.googleusercontent.com/skUZVWtZmLag92lLVD50-vnhVHoeK96GNr1XMNSGBeXBBm7Ib3-R700nduN7YCVmim9CLe33Y8OVOaT4y5DYu3ilwuSZXB-28slWjaY3v6bRQGGcYU5n1QIqDdSSq09q2PAdo6Ow" alt="Constant string definition"></div>

<div align="left"><img src="https://lh4.googleusercontent.com/j4L5gjyBP6DafQ_padrtQTQe9_h9LlI8tG7aYKpdKUCoxAgu2VKz9TXqYFd7SVmq7rJ1FF1HeO1T7JIxFf246U-QCzfXzHnP-nhSr9iRooVR4AT0-3_5bImOx73r60v-L9E3G4e1" alt="ƒx (String): Defines a string of placeholders values for desktop and touch devices"></div>

### State

Setting a text placeholder with standard and touch devices.

### Value type

Any String value

### Availability

[File Upload](/reference-guide/components-list/file-upload)


# DESCRIPTION

String, Array Object

### Property description

The description provides the footer text information property of the current component.

<div align="left"><img src="https://lh4.googleusercontent.com/vP3mR90WryhXPWrqMh316cMzYofp0S3sYotW1Jr1rRvkwe3_arLna3_JhjiEMXFyve_UTKtX8hnDKrC9_Qj7uSoXFC0vv9zjKIO_f0VcNZzAcFbBSXRbVI3Q593stGBjBMPeXNcv" alt="Static setting of description"></div>

<div align="left"><img src="https://lh3.googleusercontent.com/xpr3CRAug7fVx_a1-lIf4IGKTncj0RGbT4H02l7E9KLNyi2YUYbiymEYsdMPci5NV2zXnm7nYOyuN6ayNGk37uVB3hzBkALBNbDUDGx4Zx3nAjIyR-mJuf_UTSpGGE_XGP4Vf7XD" alt="ƒx (String): footer String value"></div>

A whole description object is possible to configure as an expression.

<div align="left"><img src="https://lh4.googleusercontent.com/3xs7YObcjHDoTFv5ipwatYIoAEN3J7oiG5FvE9UEBipyqbMl4wk1vnTRbUAKwG1BVi7pthv-XdnNzRq5LhW6yrxWrVhsU9eGlE4dx-ynK4If7lhyBrB_XtcyZn-oqfAl-9Y8BJt5" alt="ƒx (Expression)"></div>

<div align="left"><img src="https://lh6.googleusercontent.com/qRgObM9LKlXSp2yH0VTSg8kg21ihgDHb8yj8dHyppScVC9WEsq6PQtd-ROb_MX6_PEElU6SNNTYrqjx2uRPB_seFtynph0kc3raYAd-Tzrt81FmIjHqXZuB5wV3RJlYryqoRNdbw" alt="ƒx (Expression): {value: &#x22;Footer describtion&#x22;, style:{italic: true}, foregroundColor: &#x22;ORANGE&#x22;}"></div>

### State

Setting up footer size description text.

### Value types

Any String or Array mapped Object

### Availability


# ENABLED

Boolean

### Property description

A disabled component is unusable, but its output is still graphically rendered. Content cannot be submitted or is not readable.

<div align="left"><img src="https://lh4.googleusercontent.com/XvvcTkHgCML3CDW56PHe8ZBDlb4f-0PxW1w46LiIf0zdUrXM5e5dK5lHM3gtDk_ifx5wxyWih9mw9EhXuoRJDEaa9_J_HDwioVB3zesLS9-lfDscZ5Hc643tsC-G1jplDagNbz1c" alt="Static switch for enable or disable state"></div>

<div align="left"><img src="https://lh3.googleusercontent.com/_Royf_Y37o4LW4Pzv3HjL-apUBaQ69j_SspKDgtjMsG67uN1onvVabojOXfWXHcrwuHiUTKbqufhmaiT8eu415dNmzzYi43WRSGV7w484_eMB64XeqJllgvyw2dCKA9_Z46UaU1m" alt="ƒx (Boolean)"></div>

### State

Switching ON/OFF all component properties.

### Value types

true, false

### Availability


# FONT SIZE

String Value Type, Pixel Ratio

### Property description

A font size of the current text property is mainly picked from redefined value types. If required, the pixel value ratio can be used.

<div align="left"><img src="https://lh6.googleusercontent.com/ZIBW66Iqero3W0Rw7rWSz17unjOMFF5TGf_BpSEoE24wFx57eHjC56ISAq1xssiEyaCHKVWtVS5ZOOcHO9wsEtaJbTBo6BuGRb4E5VhlGzG7JAu5kVBQOvnmEduDQX_RbfRvg2Ka" alt="Choosing from redefined values or setting up the required pixel ratio"></div>

<div align="left"><img src="https://lh4.googleusercontent.com/mIKpkVFBtupK6_8wMj9pJj_6aoI3VoiXXnAD6eJndM3wJuurR5UQxgeINER9QlTDm1pCU6nS8hmiLsaBkFxM3gpvvSVDaIoOcVsGpbF4S76fHDbba9J_taZcjzQLVQrumRKDO6pk" alt="ƒx (String value types, Pixel ratio): Value types or pixel ratio"></div>

### State

Setting up the font size of a current property.

### Value types

BASE, XSMALL, SMALL, MEDIUM, LARGE, XLARGE, XXLARGE, XXXLARGE

### Availability


# FOREGROUND COLOR

String Value Type

### Property description

Setting up the foreground color of a specific property can be picked up by redefined palette colors or choosing desired one by grid or spectrum. Another option is to handle with color is hashtag expression.

<div align="left"><img src="https://lh5.googleusercontent.com/-MqBFPHwRUOUsZvPUvoQ88MzxYhTgzZAPVkJl5OzxYxkQ7CRdcJNkKonMNG3srbz_Aur3yGxY1W8FBJQ7U5Z9XZmp1adXX-OhosemJWwwxSJVutr3Yq4ERORd3J6k7V3IwB-d186" alt="Static setting of desired property"></div>

<div align="left"><img src="https://lh6.googleusercontent.com/h8IbewknJoBPwL63IRWk2_FnMKI0HEATqhHItgm63FECy24jvlyTT0UHH1Z2W7uvrIvjl3Hwz3-22IpjvRUzGIvh4U584us7G6hyXhUTWcd_ARpkNbFFH3c2ZLCeb6GWsjdPn2f1" alt="ƒx (String value type, #Hexadecimal): Setting foreground color by value type or hashtag hexadecimal number"></div>

### State

Setting up the oreground color of a current property.

### Value types

<https://htmlcolorcodes.com/color-names/>

### Availability


# FORM DATA KEY

String

### Property description

Sending a file through FormData API under a specific string key is possible to set up if the situation requires it.

<div align="left"><img src="https://lh5.googleusercontent.com/ALsJqhGgBiL0EEqn5CfXRj41RSbuydRnIsxtVoqZq50CimKk9YSOyQpjMA89_zNMyed-TI53KsZDfGVq0FW0gn6pBa8aVKQEpgl-VgQwd36K2AAHwoAk2YjHsI6l77m42bqAb3vr" alt="Constant string setting"></div>

<div align="left"><img src="https://lh6.googleusercontent.com/6xq58SlN4oNYiXP01HK4_-jU8kzOlyZft19h1KfVLKOYGYgiYp-26ydk1zjr-ZNfH9CQhZc_Wk8lt7VvUMyo0lr0Qx_WnSFqJUT9XNXdkHme0s2la9gK-MTIaSMyxuZ8eepg15-X" alt="ƒx (String): Setting up String FormData key value"></div>

### State

Setting specific string key.

### Value types

<https://developer.mozilla.org/en-US/docs/Web/API/FormData>

### Availability

[File Upload](/reference-guide/components-list/file-upload)


# HEADERS

Map Object Value Types

### Property description

Setting up the Headers information by adding any desired number of keys and their values.

<div align="left"><img src="https://lh3.googleusercontent.com/5QPwhKvIDvTS73E5YRgDB80ujWKxiwY3YfEtHVDYnFjFHap90k1umnX9ypWNenNHWCW-hkmiq8xxApojzlCzTKADBj52OG8k8E_ZQ91QD3z_hM6DgS-Fd5_2zo6h-A8fbKVPxWHw" alt="Setting headers as a  constants"></div>

<div align="left"><img src="https://lh6.googleusercontent.com/bufvc4lIRszSfItzMAuawkrtv4E7Hymm-tCWtZwkMDw7o3ITw1nhwiLEMmrqKJbS1Xgpz6y_UOF7pwxOcJM9LBwTekSK29gyG4bVN43Cn0yPrFbN95JqMFLNd9TqorXjew48YGWD" alt="Setting constant headers keys"></div>

*If required, headers keys and defining their values can be mapped as an object.*

<div align="left"><img src="https://lh4.googleusercontent.com/7fttslAyT-sYtOdtPPS_PkAuYujWq4mprGbM967YkvnC3bxPGINM-DIfnS7I9uoDo8G-m3s0jP48OWZkpAkp-BwqmBbegS2VzTg0WASvVjT-G3kcZkE5_WoePEQJg9yc0uo3b-SJ" alt="ƒx (String): Required string header"></div>

<div align="left"><img src="https://lh4.googleusercontent.com/V6Ti1pwlErckoHF-87eLcXnKM8Lq8ZOOS1U9LqTDrmhXFzzhAB6dmg0YTrm2A4bvJES4N1wLYw2VuhWbt5kVDm4J-u-dxTZvcS6YS_r9Wns-rkSbLKxnisyQB-oqrLFD5MhFaF_h" alt="ƒx (Expression): fileHeader is set up as a function variable"></div>

### State

Setting up headers for outgoing form.

### Value types

<https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers>

### Availability

[File Upload](/reference-guide/components-list/file-upload)




---

[Next Page](/llms-full.txt/1)

