LogoLogo
  • Adapptio User Documentation
  • Getting Started
    • Quickstart
    • Architecture Overview
      • Views
      • Actions
      • Integrations
      • API Endpoints
      • Routes
      • Events
      • Assets
    • Editor
      • Main Menu
        • Create New Resources
        • Manage the Application
        • Monitoring Errors
      • Main Toolbar
        • Deploying the Application
        • Opening the Application
        • Preview Mode
        • Error Monitor
      • Components Panel
        • Components
        • Inspector
        • View Settings
      • Outline Panel
        • Data Variables
          • State Variable
          • Data From Action
      • Data Explorer
      • Console
    • Playground
  • Working with Adapptio
    • Best Practices
    • Tutorials
      • 1. Hello World
      • 2. Visualize Data from API
      • 3. Advanced Layout Application
      • 4. Application with In-Memory Database
    • How To
      • Custom Auth
      • Action Logic
        • Transform Node
      • UI Logic
        • Logout
        • Conditional Render
        • One Of
      • Data & Dynamic values
        • Custom Variable
        • Data from Action
        • Dynamic Value
        • Change Value from Event
        • Loading Data from Action to Form
        • Sending Data to Action from a Form
        • Server-side Dropdown Autocompletion
      • Visual
        • Styling Icon Button
      • Layouts
        • Centered Box
        • Header & Sidebar Layout
        • Grid Form Layout
        • Stretched Layout in Row
    • Components
      • Composed Chart
      • Advanced Table
      • Custom Component
    • Examples of Applications
      • SaaS Platforms
      • Customers Portals
      • Information Systems
      • Internal Tools
        • Color Picker
      • IoT Applications
      • Smart Portals
      • Analytics & Calculators
      • Statistics & Monitoring Panels
      • API Data Visualization
      • Simple Games
  • DEPLOYMENT
    • Cloud Hosted
    • Self Hosted
  • REFERENCE GUIDE
    • Components List
      • Application Header
      • Box
      • Container
      • Grid
      • Sidebar Layout
      • View
      • Text Input
      • Number
      • Checkbox
      • Option
      • Date and Time
      • File Upload
    • Properties
      • ACCEPT
      • CUSTOM PLACEHOLDER
      • DESCRIPTION
      • ENABLED
      • FONT SIZE
      • FOREGROUND COLOR
      • FORM DATA KEY
      • HEADERS
      • ICON
      • ID
      • LABEL
      • METHOD
      • MULTIPLE
      • MAX FILE SIZE
      • REQUEST TIMEOUT
      • REQUIRED
      • READ-ONLY
      • SIZE
      • TEXT ALIGNMENT
      • TEXT STYLE
      • URL
      • UPLOAD IMMEDIATELY
      • VALIDATE
      • VALUE
    • Functions
      • Array
      • Date
      • Generators
      • JSON
      • Logic
      • Math
      • Object
      • String
      • Types
      • Util
  • Support
    • Get in touch
    • Release Notes
  • Legal
    • Terms and Conditions
    • GDPR
Powered by GitBook
On this page
  • The Goal
  • The Description
  • The Knowledge You Will Get
  • The Project Structure
  • 1. Prepare an Action Returning Hello World String
  • 2. Add Data from Action in the MainView
  • 3. Create an Output Text Layout
  • The Conclusion

Was this helpful?

  1. Working with Adapptio
  2. How To
  3. Data & Dynamic values

Data from Action

PreviousCustom VariableNextDynamic Value

Last updated 3 years ago

Was this helpful?

The Goal

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

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

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"

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".

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.

Follow up on our Data from Action tutorial

https://youtu.be/zdR6fGLgbDo
Data from Action Application