Bravo Studio Help Center
  • Get started with Bravo Studio 👏
  • Get Started
    • 🚀Create your first app
    • 🌟Bravo introduction
      • Get ready to create your app with ChatGPT
      • Create an app
        • Creating an app with Figma
        • Creating an app with Adobe XD
      • Duplicate an app
      • Delete an app
      • Replace linked Figma file
      • The app page
      • Sharing your app
      • Add an editor to your app
      • Fonts
        • Adobe XD - Supported fonts
    • 📱Bravo Vision previewer
    • ✨Unlock power features to create interactive apps
    • 🎓Help and tutorials
      • 📖App guide tutorials
        • Sample app tutorial: Your first binding
        • How to build a Fitness app with Bravo, Xano and RevenueCat
        • Foodgram: Social content sharing
        • Expedition journal: Write and share your adventures
        • My Subscriptions: Display data based on device ID
        • My Notes: using user ID and email from Firebase
        • My Store: Sell physical products with Bravo and Stripe
        • Titan: How to create a Smart Home App with No-Code?
        • n8n: Building an expense tracking app in 10min
      • 📺Learn with videos
      • 📚Learn with articles
      • 🗃️Browse by app feature
        • Save or "bookmark" a page
        • Backend search with Airtable
        • Backend search with Xano
        • Nested lists (list within a list)
        • Create and edit user profile (Firebase + Airtable)
        • Skeleton loader
        • Create albums in your app with Bravo Infinite images
  • Set up your design
    • 🖌️Get your Figma ready for Bravo
      • 🗃️Structuring the design: the layer hierarchy
      • 🪄Bravo Tags: adding functionality to the UI elements
      • 🧱The container
        • Setting up a container on Figma
        • Setting up a container on Adobe XD
      • 📲App navigation
        • Setting up app navigation on Figma
        • Setting up app navigation on Adobe XD
    • 🔌Bravo plugin for Figma
    • 💾Sample design files
    • 🤓Best Practices
  • App components
    • 📒Bravo Tags Master List
    • 🚪Menus
      • Modal Menu
      • Modal pages
      • Tabs Menu
      • Pop Up pages
      • Slide Menu
    • 🍞Pages
      • Modal pages
      • Pop-up pages
      • Swipe page
      • Transitions page
      • Page reveal animations
      • Page tabs
      • 🔮Stateful pages
    • 📦Containers
      • Swipe to delete
      • Top bar
      • Carousel slider
      • Aspect ratio relative to screen
      • Sortable List
      • Layer (sticky element)
    • 👋Intro & Onboarding
      • Intro page
      • Post-login page (Onboarding)
    • ⌛Loading experience
      • Loading page
      • Custom loading page
      • No loading
      • Preload
    • 📝Form & input fields
      • 👁️Password Visibility Toggle
      • 🩷Stateful input
        • ☑️Checkboxes (Multiple select)
        • ✅Required Checkbox
        • 🔘Radio buttons (Single select)
      • ⏳Input time Interval
      • 📄Dropdown selector
      • 🎚️Slider control
      • 🗓️Calendar picker
      • 📄Send form input to a database
    • 💎Components
      • Autoplay Video
      • GIF
      • SVG Component
      • Web view
      • Web Components using AI
      • Web view communication
      • LottieFile
      • Lottie-animated component
      • Flexible text (Flexo)
      • Zoomable image
      • Component states
      • Stateful component (like button)
      • Setting up the backend of Stateful component (like button)
      • Haptic Feedback (Buzzz)
      • Progress bar
      • Rich text
      • Date, Time and Currency Formatter
      • Scrollable text
      • Text Lines & Truncation
      • Status bar
    • ⚡Mobile actions
      • Mobile Actions
      • Play audio
      • Record audio
      • Play video
      • Scan QR code (external URL)
      • Scan codes (remote action)
      • Search & filter
      • Refresh page
      • Share location
    • 📱App Icon & Splash Screen
    • 🗺️Map with markers
    • 📈Charts
  • Data and Backend
    • 🗂️Set up a no-code backend
      • Xano
        • Nested lists (list > list > detail page) with Xano
        • Create a bookmark functionality with remote actions and device ID with Xano
        • Multi-user setup with Xano
        • 🔒Setting up the Xano Log in Snippet
          • ♻️Refresh Token
      • Airtable
        • Nested lists (list > list > detail page) with Airtable
        • Sort list with Airtable
        • Connect multiple tables from Airtable to one app
        • Update Airtable's API key to Access Token
      • Backendless
      • Bubble
      • Notion
        • Getting data from a Notion table
      • Firebase
        • Getting data from Firestore
    • 💾Set up API requests
      • Set up from scratch
        • Airtable
          • Set up an API GET request for list page - Airtable
          • Set up an API GET request for detail page - Airtable
          • Set up an API POST request - Airtable
          • Set up an API DELETE request - Airtable
        • Xano
          • Set up an API GET request for list page - Xano
          • Set up an API GET request for detail page - Xano
          • Set up an API PATCH request - Xano
          • Set up an API POST request - Xano
          • Set up an API DELETE request - Xano
      • Using GraphQL body type
      • Set up with API wizard & importer
        • Using the Airtable API Wizard
        • Using the Xano API wizard
    • 🎲Variables
      • Built-in variables
      • Set Variable
    • 📚Data Collection & Binding: Complete Collection
    • 🗂️Pagination
    • 🐛Debugging API issues
      • ⚙️Debugging requests in the API Collection
      • 📲Event logger
      • 🔗Link property
  • Data binding
    • 🤝Data binding types
      • API binding types
      • Bind multiple API requests to one screen
      • How to connect my API to a mobile actions
      • Remote actions: trigger an API request with a UI element
    • 💡Display data in your app
      • Bind data to design for a list page
      • Bind data to design for a detail page
    • 🆕Create data from your app
    • 🗑️Delete data from your app
    • 🚦Conditional Visibility
    • 🎛️Conditional Actions
  • Integrations & Settings
    • 🖇️Deep Links
      • 🖇️Deep Links for Bravo Vision
      • 🖇️Deep Links for published apps
      • 🖇️Troubleshooting Deep Links
    • 🔔Push Notifications with OneSignal
      • How to get a Bravo page URL
    • ⚙️Firebase Configuration
    • 🔐User Authentication
      • 🔑Authentication with Kinde and Xano
      • 🧙🏽Authentication with OAuth 2.0
        • Using social logins to authenticate users
        • Using AWS Cognito to authenticate users
        • Connecting to Spotify API
      • 📲User login with Firebase
        • ✉️Email and password Login with Firebase
        • 📞Phone Login with Firebase
        • 🍎Social Login with Firebase
        • 👻Anonymous Login with Firebase
      • ⛓️Authentication with custom backend
        • Set up Xano as your user authentication backend
    • 💰Stripe: One-time Payment
    • 💬Chat: CometChat
    • 💸RevenueCat: In-app purchases and subscriptions
    • 📉Bravo Analytics
    • 📳Facebook App Events
    • 📊Google Analytics
    • 🌐Multilingual apps
    • 🕸️How to connect with Webflow API
    • 📡NFC connection
    • 🎯Admob
  • App Publication
    • 🚀Publishing your app
      • iOS Publication: Complete Process
        • 1. Generate Certificates, AppIDs and Provisions
        • 2. Get the IPA
        • 3. Upload IPA to App Store Connect
        • 4. Test your app on TestFlight (optional)
        • 6. App Store publication
        • 7. Updating an app in the App Store
      • Android Publication: Complete Process
        • 1. Create a Keystore File (optional)
        • 2. Get the Debug APK to install
        • 3. Install the Debug APK in your device
        • 4. Get the AAB (Android App Bundle) file to publish
        • 5. Google Play publication
        • 6. Updating an app in Google Play
      • Android APK Installation Guide
      • Rejection from the app stores
    • 🎛️Making changes to your app after publication
    • 🛍️Versioning
    • 🌟App rating alert
  • Good to Know
    • 🤔Troubleshoot
      • Errors when logging in
      • Errors when creating an app
      • Errors in API requests
        • Request timeouts on Bravo
      • Errors after importing
      • Errors in publication form
    • 🧑‍💻Manage your account
    • 💳Billing
      • Bravo Subscription Plans Overview
      • App Add-ons
      • Upgrading a plan
      • Downgrading a plan
      • App allowance
      • Invoices & payment method
      • FAQ
    • ❓FAQs
      • About Bravo Studio
      • Importing a design file
      • Bravo Vision
      • Bravo Tags
      • API & Data Library
      • Login & Account
      • Other Features
  • NEED SOME HELP?
    • 📖Bravo Support Guide
    • 🤝Join the Bravo community
    • 🤖Bravo Assistant
    • 👥Production support
    • 🐞Report an issue
Powered by GitBook
On this page
  • Using variables in Bravo
  • How can a variable be defined?
  • Where do variables take their value from?
  • Built-in variables
  • Variable tutorials

Was this helpful?

  1. Data and Backend

Variables

PreviousUsing the Xano API wizardNextBuilt-in variables

Last updated 1 year ago

Was this helpful?

A variable is a piece of data whose value can change over time. In Bravo, variables are used to populate dynamic content into an app: for instance, display specific information depending on the app user, or get a specific database record to display data in a .

Variables consist of two parts: the variable name and the value. The variable name will be always the same, while the value will change dynamically.

You can learn more about variables in Bravo in the video below.

Using variables in Bravo

As explained previously, variables have two parts: a variable name, that doesn't change over time, and a value, that normally changes over time. Setting a variable name is called defining the variable, and it's described in the section below.

How can a variable be defined?

There are several places where we can define variables:

API request URLs

API request body and headers

For optional variables, add "?" to the variable's name, for example: ${name?}

Where do variables take their value from?

Now we have defined the variables by indicating a variable name in our API request. However, we're still missing the value for the variables. How can we connect both parts?

Values for our variables can be obtained from several parts.

Selected data from another API request

When an API request is executed successfully, a response message is received. This message can contain some data. The data items that we want to use can be selected in the “Received Data” section:

Then, in the “Selected Data” section, each data item can receive a name. This name is set to a default one, but it can be edited when needed:

Once all these items are selected, they’re exposed as variable values. What does this mean? They can be used in other API requests as variable values, as long as the data item name (specified in the “Selected Data” tab shown above) and the variable name match. They need to have exactly the same name, including uppercase/lowercase.

In order to “pass” these values from the request where they’re received, to the request where they’re used as a variable, the two requests must be bound to UI elements in the same screen, or in different screens connected with a prototyping link in the design file. In case the requests are bound to screens that aren't linked in the design file, the values won't be passed.

For instance, in the list and detail page example, the following occurs:

  • A GET request is triggered to retrieve data for the list items. In this request, an item ID needs to be selected. Let’s say it has the name id.

  • In the design file, the list container in the list page is connected with a prototyping link to a detail page. This way, when a user presses on a list item, they navigate to the detail page. Also, this link enables “passing” the value of the id from the GET list request to the requests bound to the detail page.

  • A GET request is used to obtain the data for the detail page. This request will normally obtain a single database row (the one corresponding to the list item the user chose before). The request will need to have an ID value, so the backend knows which row to return. Since we exposed the id data item in the GET request for the list, we can use a variable ${id} in the detail GET request URL, that will receive the ID of the item the user chose in the list page.

The API request URL targets Airtable in this case. The request structure might be different depending on your backend, but the variable data will be passed in the same way.

User input

Remote action tag

We can define one or more variable values in the remote action tag as shown below:

[action:remote:var1=value1;var2=value2;var3=value3]

Here, var1, var2 and var3 would be the variable names, and value1, value2 and value3 would be their values. Both numeric and text values can be used.

Then, if we bind an API request to the remote action, we could define variables that receive those values: in this case, ${var1}, ${var2} and ${var3}. As indicated in the previous section, those variables can be defined in the request URL, body or headers.

Note this only works with strings, not booleans or any other data type.

Test values inside the API request

Finally, another way to give a value to a variable is using test values inside an API request in our collection. We’ll need to do this if we want to test a request we just created, to see if it works properly, and select the data we need. Note that this test value won’t be passed to the variable when using the app - the variable value will be determined with one of the methods described before.

Built-in variables

In contrast to user-defined values, built-in variables are special variables whose value is filled in automatically by Bravo. This includes user and device IDs, geolocation data, and more. You can learn more in the link below.

Variable tutorials

In Bravo, variables are defined with the following notation: ${VariableName}. Here, VariableName would be the variable name, and it’s defined by us - it can be anything we want, unless we use a . Note that the variable name must always be surrounded with the two brackets and the dollar sign: ${}.

Sometimes, the backend requires some input data to be able to return the information needed. In the example, for instance, we’ll normally have a API request that requires the record ID as input, to return the data only for that table record (the one we'll use in the detail page).

Another use case could be sending a to the backend, for instance, to return information based on the user or device ID.

Besides request URLs, variables can also be included in the request body or in the headers. An example would be a POST request sending to the backend.

Another way to set the values of a variable is binding them to an input field in a . This way, in case we have defined some variables in the body of the request bound to the form, we can bind them to the Input Destination property of the different input fields. In this case, the variable values will be the data introduced by the user.

With a , an API request can be bound to a UI element in a screen. This way, when the user presses this UI element, the API request is triggered.

🎲
built-in variable
detail page
built-in variable
form data
form
remote action
Built-in variables
Set up an API GET request for detail page - Airtable
My Subscriptions: Display data based on device ID
Create a bookmark functionality with remote actions and device ID with Xano
detail page
Example of a GET request URL. In this case, we want to send a record ID to the backend, so we obtain only the data for that record. This ID will change dynamically depending on a user action (for instance, selecting a list item).
Example of a GET request that returns a list of items filtered by device ID in the backend.
In this request body, we define variables that will contain the values provided by a user in a form.
Body of the POST request that sends the form data to the backend
Form input data binding