📈
Knowledge base
  • Getting started (placeholder)
  • Basics
    • Intro (placeholder)
      • "Hello world of PWA!" app
      • Testing the App
      • How to hide / show screen elements
      • Create user actions: switch screens, change data and make API calls
      • Screens
      • Show any platform Data in app ellements
      • Showing Data in app - Filters
      • Loops - display multiple line results in app
      • Automating Business Processes & Funnels via Triggers
      • Send and Receive data via external API integrations
      • Chaining API calls
      • Use MathJS formulas
  • PWAbility
    • PWAbility
      • App distribution
      • Saving Mobsted PWA App
      • Smart Messaging
      • Guaranteed delivery
      • Offline Mode
  • Messengers
    • Intro (placeholder)
      • Set up VK bot
      • Set up Facebook bot
      • Set up Telegram Bot
      • Set up Viber bot
  • Data
    • Import data (placeholder)
    • Export data (placeholder)
  • References
    • Intro(placeholder)
      • Constructor elements to build your app
      • Filter any backend and Object data
      • Manage app users and objects
      • Events
      • Statuses
      • Hashtags
      • Variables
      • Lists (placeholder)
      • User Access
      • API Description (placeholder)
Powered by GitBook
On this page

Was this helpful?

  1. Basics
  2. Intro (placeholder)

Loops - display multiple line results in app

Apply loops to screen elements

PreviousShowing Data in app - FiltersNextAutomating Business Processes & Funnels via Triggers

Last updated 5 years ago

Was this helpful?

Use screen elements loops to display resulting arrays of filters and API requests on an app screen. Common example of such arrays is a list of items in a shopping cart or a list of payments.

The platform allows to create loops over:

  • Filter data

  • Operation data

In both these examples we will take the following steps:

  • Set up data source: Filter or Operation

  • Set up loop that will parse the data from the data source

  • Call the loop reference and extract its' data.

Before proceeding, please make sure that you are familiar with

Make sure you have accomplished the steps described article before implementing the steps below.

__________________________________

DISPLAYING DATA FROM FILTERS

At we have created AgeEmail filter that shows users with Gmail account with the age less than specified. Here we create a loop to display Name and Age of all the filtered records.

Steps to take:

  1. Navigate to Constructor

  2. Create new screen by clicking Add New Screen at the bottom of the platform

  3. Drag and Drop element

  4. Set its' properties:

    • Backendname as Age

    • Default Value as #Variable:age#

  5. Drag and Drop element

  6. Set its' properties:

    • Backendname as Button

    • Caption Button as Less than Age #Backendname:Age#

  7. Click Actions button and Add new action from drop down:

    • Set variable with the Name: Age and Value: #Backendname:Age#. Click Save

    • Add Go to action. Select Screen and in Choose screen drop down select the screen you are on now. This will reload the page. Otherwise the filter results will not be updated.

9. Set it's text: Filtered Data:

11. Enable looping for that element - find LOOP in the right hand side menu and check Enabled box

12. Set up Data Source: #ObjectsFilter:AgeEmail:Data#, where AgeEmail is the name of our Filter

13. Enter Loop Name: AgeEmailLoop

14. Go to Text field of the element and set up what will be displayed in each element by pulling the required Object columns from the loop:

  • to display Name use Employee:#Loop:AgeEmailLoop:objects@Name#

  • to display Age use Age:#Loop:AgeEmailLoop:objects@Age#

15. Click Save Screen

16. Click Preview button to launch app from the screen to check it works.

You can have a look at how it's implemented in Demo App in your account, screen - 9 Filters Iterate.

_______________________________________

DISPLAYING DATA FROM OPERATIONS

We have a screen, where a user can select a country from the drop down and see its' public holidays. For this example, we have pre-created API Operation to the 3rd party service.

Steps to take:

  1. Use Add Option and create a list of countries:

    1. Label = USA Value = US

    2. Label = Canada Value = CA

    3. Label = Brazil Value = BR

  2. Set it's properties:

    1. Backendname = holidaysButton

    2. Caption Button = Check Holidays

  3. Click Actions, select Execute Operations and add pre-created Holiday operation

  4. Enable looping for that element: find LOOP in the right hand side menu and check Enabled box

  5. Set up Data Source for the loop: #Operation:Holiday:Response:Result:0:response:holidays#

  6. Name the loop as Holidays

  7. Go to Text field of the element and set up what will be displayed by pulling the required array elements from the loop (OPERATION):

    1. #Loop:Holidays:name#

    2. #Loop:Holidays:date:iso#

11. Click Preview button to launch app from the screen to check it works.

You can take a look at how it's implemented in Demo App in your account, screen - 13 Operation Loop Screen.

Note: we only use at sign (@) to reference Object properties (#Loop:AgeEmailLoop:objects@Age#). When referencing Operation, we use colons only (#Loop:Holidays:date:iso#).

MENTIONED ARTICLES

RECOMMENDED ARTICLES

8. Drag and Drop element

10. Drag and Drop another element

Drag and Drop element

Drag and Drop element

Drag and Drop element

Text
Text
Hashtags
Operations
Constructor elements
Use automatic data filters
Automate with triggers
Smart filters
Hashtags.
Use automatic data filters
previous step
Text Input
Button
[Step by step example →]
[Step by step example →]
Select
Button
Text