> For the complete documentation index, see [llms.txt](https://mobsted-2.gitbook.io/knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mobsted-2.gitbook.io/knowledge-base/basics/introduction/actions.md).

# Create user actions: switch screens, change data and make API calls

Assign any platform actions to any app user actions:

| **USER ACTIONS** that can be processed by platform                                                                                    | **PLATFORM ACTIONS** assignable to user actions                                                                                                                                                                                                                            |
| ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Button click** [\[Step by step example →\]](/knowledge-base/basics/introduction/actions.md#add-actions-to-buttons-images-and-links) | **Go to** screen - redirect user to another app screen, back to previous screen or to external URL.                                                                                                                                                                        |
| **Image click** [\[Step by step example →\]](/knowledge-base/basics/introduction/actions.md#add-actions-to-buttons-images-and-links)  | **Scroll to** - scroll to top / bottom of the current screen.                                                                                                                                                                                                              |
| **Link click** [\[Step by step example →\]](/knowledge-base/basics/introduction/actions.md#add-actions-to-buttons-images-and-links)   | **Create Event -** save files and data using Hashtags as **Event** in the platform events table. [\[Step by step example →\]](/knowledge-base/basics/introduction/actions.md#create-event-and-save-related-data)                                                           |
| **App screen refresh** [\[Step by step example →\]](/knowledge-base/basics/introduction/actions.md#add-actions-to-screens)            | **Save to Object column** - store data using Hashtags in **Object's** particular column. [\[Step by step example →\]](/knowledge-base/basics/introduction/actions.md#save-data-to-current-object-on-button-click)                                                          |
|                                                                                                                                       | **Execute Operations** - execute selected operation on button click. [\[Step by step example →\]](/knowledge-base/basics/introduction/actions.md#execute-api-operation-on-button-click)                                                                                    |
|                                                                                                                                       | **Set Variable** - create variable on button click. Variables store temporary data which can be used in other parts of the platform via Hashtags links.[ \[Step by step example →\]](/knowledge-base/basics/introduction/actions.md#set-platform-variable-on-button-click) |

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

#### ADD ACTIONS TO BUTTONS, IMAGES & LINKS

1. Open any app you have
2. Add [**Button**](/knowledge-base/references/intro-placeholder/constructor_elements.md#button)**,** [**Image**](/knowledge-base/references/intro-placeholder/constructor_elements.md#image) or [**Link**](/knowledge-base/references/intro-placeholder/constructor_elements.md#link) element to an app screen
3. Click on it on the screen
4. Click **Actions** button on the right hand side
5. Select the necessary action from **Add new action** dropdown.

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/4jb98oxf8g/1559496289331/screen-shot-2019-06-02-at-8-22-06-pm.png)

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

#### ADD ACTIONS TO SCREENS

1. Mouse over any of **User screens** on the bottom of **Constructor**
2. Select **Edit** screen settings by clicking the **pen**![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/4jb98oxf8g/1559496362571/image.png)
3. Click **Actions** button on the right hand side on **Constructor** screen
4. Select the necessary action from **Add new action** dropdown.

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

#### CREATE EVENT AND SAVE RELATED DATA

In this example we create[ **Text Input**](/knowledge-base/references/intro-placeholder/constructor_elements.md#text-input-and-text-area) and[ **Button**](/knowledge-base/references/intro-placeholder/constructor_elements.md#button) which saves the data from the text input to [**Event**.](/knowledge-base/references/intro-placeholder/events.md)

**How to set it up:**

1. Open any app you have and click **Add screen**
2. Drag and drop **Text Input** element, set properties:
   * **Backendname** = *Email*
   * **Placeholder** = *Enter your Email*
3. Drag and drop another **Text Input** element, set properties:
   * **Backendname** = *Question*
   * **Placeholder** = *Enter your question*
4. Add **Button** element to app screen, set properties:
   * **Backendname** = *Contact*
   * **Caption Button** = *Contact me*
5. Click **Actions** button on the right hand side
6. Select **Create Event** from **Actions** dropdown
7. Name the action as *Contact Action*
8. In **Data** table click **Add item** and set:
   * **Key** = *Email*
   * **Value** = *#Backendname:Email#*
9. Click **Add Item** and add another pair:
   * **Key** = *Question*
   * **Value** = *#Backendname:Question#*

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/4jb98oxf8g/1559567430496/image.png)

1. Click **Save**
2. Click **Save Screen**
3. Click **Preview** to launch the app from the current screen
4. Fill in **Text Input** and submit the data
5. Get back to **Constructor**
6. Check the data stored in **Events:**
   * Click on **Backend** in the header to get to Events table
   * Click on the row with the last event
   * Check your data in **Contact action** section.

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/4jb98oxf8g/1564997190755/.png)

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

#### SAVE DATA TO CURRENT OBJECT ON BUTTON CLICK

In this example we create [**Text input**](/knowledge-base/references/intro-placeholder/constructor_elements.md#text-input-and-text-area) and [**Button**](/knowledge-base/references/intro-placeholder/constructor_elements.md#button) which saves the data from text input to **Name** and **Email** columns in [**Objects**](/knowledge-base/references/intro-placeholder/objects.md).

**How to set it up:**

1. Open any app you have and click **Add screen**
2. Drag and drop **Text Input** elements, set properties:
   1. **Backendname** = *Name*
   2. **Backendname** = *Email*
3. Add **Button** element to app screen, set properties:
   1. **Caption button** = *Send*
4. Click **Actions** button on the right hand side
5. Select **Save to Object Column** action from **Actions** dropdown
6. In **Data** table click **Add item** and set **Column name** and **Value** data:
   1. **Name** = *#Backendname:name#*
   2. **Email** = *#Backendname:email#*
7. Click **Save**
8. Click **Save Screen**

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/4jb98oxf8g/1555053400430/screen-shot-2019-04-12-at-11-22-04-am.png)

&#x20;   9\. Click **Preview** to launch the app from the current screen

&#x20;  10\. Fill in **Text Input** and submit the data

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/4jb98oxf8g/1555049922428/image.png)

&#x20;  11.Get back to **Constructor**

&#x20;  12\. Click **Objects** in the header to check the data stored in Object tabl&#x65;**.**

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/4jb98oxf8g/1555050253019/image.png)

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

#### EXECUTE API OPERATION ON BUTTON CLICK

1. Pick **Execute Operations** from **Add new action** dropdown list
2. Pick an existing оperation from **Add operation** drop down list.
3. Click **Save**
4. Click **Save Screen.**

{% hint style="info" %}
Note: you need to create the operation **before** calling it. Please refer to [Use any external & internal API ](https://mobsted-2.gitbook.io/knowledge-base/use_any_internal_and_external_api)article for more info.
{% endhint %}

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/4jb98oxf8g/1554976867498/ezgif-com-video-to-gif-5.gif)

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

#### SET PLATFORM VARIABLE ON BUTTON CLICK

Variables store temporary data which can be used in other parts of the platform via [Hashtags](/knowledge-base/references/intro-placeholder/hashtags.md) links.

1. Drag and drop[ **Button**](/knowledge-base/references/intro-placeholder/constructor_elements.md#button) element to any screen you have
2. Click **Actions** button on the right hand side
3. Pick **Set** **variable** from **Add new action** dropdown list
4. Click **Add item** under the **Variables** label
5. **Name** your variable
6. Use any combination of [Hashtag](https://kb.mobsted.com/article/9v4k7sfkq1-hastags) link to set the variable's value
7. Add as many **Name/Value** pairs as you need. **Add Item** button will appear each time you add and fill in **Name/Value** fields.
8. Click **Save**
9. Click **Save Screen.**

![](https://storage.googleapis.com/helpdocs-assets/jyme83anlw/articles/4jb98oxf8g/1554977028974/ezgif-com-video-to-gif-6.gif)

&#x20;Please, check [Variables](/knowledge-base/references/intro-placeholder/variables.md) article for more info.

####

#### MENTIONED ARTICLES

* [Constructor elements](/knowledge-base/references/intro-placeholder/constructor_elements.md)
* [Hashtags](/knowledge-base/references/intro-placeholder/hashtags.md)
* [Objects](/knowledge-base/references/intro-placeholder/objects.md)
* [Use any external & internal API](/knowledge-base/basics/introduction/use_any_internal_and_external_api.md)
* [Events](/knowledge-base/references/intro-placeholder/events.md)
* [Variables](/knowledge-base/references/intro-placeholder/variables.md)
