📈
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?

Last updated 5 years ago

Was this helpful?

Variables store temporary data which can be used in any part of Mobsted platform. Variables can be used to:

  • Hide/show screen elements depending on user actions [Step by step example ->]

  • Make math calculations based on user input [Step by step example ->]

  • Display API operations results depending on user input [Step by step example ->]

________________________

SETTING UP VARIABLE

Variables are set as integer or string value to/// elements and to . This is done in properties in Constructor:

  1. Add Button, Link, Image elemet to screen or select any Screen you have in the bottom of Constructor

  2. Click Actions in Properties panel

  3. Select Set Variable from the dropdown

  4. Assign one or several Name and Value pairs

  5. Click Save.

_____________________

CALLING VARIABLE

Variables can be called in any part of the platform by using Hashtags.

______________________________________________________

USE VARIABLES TO HIDE/SHOW SCREEN ELEMENTS

___________________________________________

USE VARIABLES IN MATH CALCULATIONS

______________________________________

USE VARIBALES IN API OPERATIONS

We have Water delivery app where you can select bottle size and quantity. You can also see the summary of your order upon order confirmation. We use variables to hide/show elements and for calculations.

App basic logic:

  • When a size button is clicked, it is replaced with white to indicate selection

  • If the size button is clicked again, it is replaced with blue to indicate deselection

  • When one size is already selected and another size button is clicked, the the first button is deselected automatically

  • When the order is confirmed, order information appears on the screen.

How it was set up:

  1. We created pairs of buttons for each size: blue and white.

For blue buttons:

  • Set Variable with Name/Value pairs:

    • Selected*size* = 1. The variable is set to 1 on button click.

    • Selected *other size* = 0. When one button is selected all other buttons are deselected.

    • size = bottle size

    • price = amount

Example: set up for blue buton 12 OZ.

  • Set Visibility conditions: #Variable:selected*size* = 0. The button is visible when not selected.

For white buttons:

  • Set Variable with Name/Value pairs:

    • Selected*size* = 0. The variable is set to 0 on button click.

3. Confirm button Variable set with Name/Value pair:

  • total = =(#Variable:price# * #Backendname:amount#)=.

4. Text element calls out Variables:

  • #Variable:size# from the selected size button

  • #Variable:total# result of calculation from Confirm button.

App user view:

MENTIONED ARTICLES

We have Weather check app where a user gets current temperature information on entering a city. The temperature information is recieved from service via .

Set Visibility conditions: #Variable:selected*size*# = 1. The button is visible when selected.

2. element contains drop down with quantity. It's Backendname is set as amount which is used for calculation the amount to be paid.

in Value field calls out #Variable:price# set for the selected button.

  1. References
  2. Intro(placeholder)

Variables

PreviousHashtagsNextLists (placeholder)
Hashtags
apixu.com
API operation
Math formula
Constructor elements
Use MathJS formulas
Screen
Select
Button
Link
Image
Text