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
  • ✨ Features
  • 💎 Resources
  • 🏗 Creating the backend with Xano
  • Creating the database structure
  • Creating the API endpoints
  • 🏗 Setting up the data binding on Bravo
  • Creating the requests on the Data Library
  • Bind the data to the screens

Was this helpful?

  1. Data and Backend
  2. Set up a no-code backend
  3. Xano

Nested lists (list > list > detail page) with Xano

PreviousXanoNextCreate a bookmark functionality with remote actions and device ID with Xano

Last updated 11 months ago

Was this helpful?

In this tutorial, we'll build an app inspired in a famous service used by travelers and digital nomads, with information about some of the most popular cities in the world.

To build it, we'll use , a powerful no-code backend tool, that will allow us to define the database for the app, and build the API endpoints that will be used later to connect Bravo and the database.

✨ Features

  • List of all the cities, with screens displaying information about each one of them.

  • Screen for the different regions in the world, with a list of the cities that belong to that region (List of regions → list of cities in the region → screen with city details).

  • Customizable no-code backend, ability to define the API endpoints.

💎 Resources

  • Design file: Figma

    This Figma file is Bravorized and ready to be imported into Bravo. If you want to customize it, duplicate it on Figma and make all the edits you wish.

🏗 Creating the backend with Xano

Creating the database structure

First, we'll create two tables in Xano: Cities and Regions. In the Cities table, we'll store all the information about individual cities: population, monthly living cost, winter and summer average temperature. In the Regions, we'll store the names of the world regions, and a picture to use in the app to identify them.

We'll first create a table with the cities. In the database tab in Xano (on the left), we'll click Add Table, and name it Cities. Two fields are already created in the table: id and created_at. We'll add the following fields (by clicking the + icon):

  • city (text field)

  • population (integer field)

  • living_cost_euros (integer field)

  • winter_temp (integer field)

  • summer_temp (integer field)

  • picture (storage → image metadata). We'll add a header picture in the screen for each city.

We'll add the following sample cities in the database:

Now, let's move to the table with the world regions. We'll add a table with the name "Regions", and then create these two fields.

  • region (text field)

  • picture (storage → image metadata), we'll use it to display later in the app the list of regions.

Finally, we need an extra field in this table. We'll use this to establish the relation between the Regions and the Cities tables, by saying which cities belong to each region. This field will have a Table Reference type. In "Choose Database Model", we'll select the Cities table. Now a field called cities has been created. We also need to make this field a "list", as there can be several cities related to a single region. We'll click on the "cities" field header, and in the menu that pops up, select Change Type. Then, we'll select list structure, instead of "single".

After having the structure set up, we'll complete the table with the following data. Remember that in the "cities" field we'll create references to the different cities we created in the "Cities" table.

Creating the API endpoints

Once we have all the data, it's time to create the API endoints! These will be the ones that we call from Bravo to feed our app with the data we just generated.

Go to the API dashboard on the left panel in Xano. In the top right, we'll click on Add API group. Put the name of "World Cities", and write a short description if you wish. You'll see that no endpoints are created for now.

First, we'll create an endpoint to get all the records of the Cities table. Click on Add API endpoint on the top right. Select CRUD Database Operations, Cities table, and finally GET. This will create an endpoint that will be targeted with a GET request, and will return all the data in the Cities table. In the last step, put a description if you wish, and click "Save".

We have created our first API endpoint! After, we'll go to a screen that displays details for this endpoint. These details correspond with the request lifecycle: the steps that Xano will complete once a request targeting this endpoint is received. Here, we'll specify how to treat the data contained in the request, and how to construct the response message.

The first step is to select the inputs that we want our endpoint to accept. As this GET request will always retrieve all the data for the cities, no inputs will be accepted.

Therefore, we'll advance to the second step, called "Function Stack", where we'll configure how to process the inputs we selected in the previous step, and what processing do we want to do with them and the data living in our database. As this endpoint will just return all the data, we just want to select all the rows from the Cities table. We can see how Xano already configured a query to do this: "Query All Records from Cities".

We'll can test the endpoint by clicking on Run & Debug on the top right, and we'll see how we get all the data from the Cities table returned.

Next, we'll create the following 3 endpoints:

GET all regions

We'll create this endpoint the same way we did for the Cities table, but instead of selecting the Cities table when adding the API endpoint, we'll select the Regions table. We'll leave the endpoint detail screen as is.

GET single city

For this request, we want to return a single row in the Cities table, corresponding to a single city. We'll specify what city to return with a URL parameter, that will be bound to the ID field in the Cities table.

In order to create this request, we'll proceed as usual by clicking on "Add API endpoint", then select the Cities table, and select the GET SINGLE request type, as shown below.

We'll also leave the endpoint detail screen as is.

GET single region

Finally, we'll create a request to get the information of a single row in the Regions table. We'll create this endpoint similarly to the previous one, but we'll select the Regions table this time.

Once we do this, we'll need to modify some information on the endpoint detail screen. Each time this single region endpoint is requested, we want to return all the information related to the cities associated with that single region as well.

To do this, we'll need to create an addon, which is a resource Xano has to extend the API response and include more data. In order to create an addon, follow these steps:

  • On the Function Stack area, click on the first row: Get Record from Regions.

  • On the right pane, click on Output. This will display how the response from the endpoint looks like. An addon allows us to include more data in the JSON response body. This data will be fetched from another table, in this case the Cities table. We'll see how the + Addon button is available next to cities_id, which is a reference field for the Cities table. The addon allows to return more data from the rows in the Cities table that are referenced by the cities_id.

  • Click on + Addon next to cities_id. The Addon area will be displayed. Click on "Create a new addon".

  • In Step 1, select the Cities table, which is where we want to fetch the data that will be inserted in the addon.

  • In Step 2, select Single Item.

  • Leave Step 3 as is, and click Next. Finally, put the name city_list to the addon.

Now the addon is created, and the data is included in the JSON body response. Here, all the fields from the Cities table have been included, but it's possible to select just some of them (for instance only the city name and the population).

The addon creation is shown below.

Once we create the addon, we cant test our endpoint and we'll see how the API returns the data for a single region, depending on the ID number we specify in the request URL, and its associated city data. We'll use this in one of our screens later.

🏗 Setting up the data binding on Bravo

Now, it's time to import our design into Bravo! To do this, login to Bravo and click on "New Project", then paste the link to the design file we provided (Figma). We'll see how Bravo generates the five screens we have on the design file.

Creating the requests on the Data Library

In Bravo go to Data and select Create new collection. Choose Xano Wizard. Follow the steps for entering your Api Key.

You can create different requests in the Data Library using Xano's endpoints as well. Whether you want to do it manually or use individual endpoints.

Get All Cities

We will change the name of the request given from Xano to All Cities and then we'll click on Send.

Now, go to "Output Varibles" and make sure the following parameters are selected.

Important step: make sure the parameter corresponding to the ID of the Cities table is named as city_id. We'll use this later for the other requests.

Get All Regions

We will change the name of the request given from Xano to All Regions.

Now, we'll create the request targeting the list of regions. Here, we won't need to obtain the individual city data yet, but only the list of all regions with their corresponding image. Click Send, and make sure the data below is selected.

As we did for the previous request, we'll set a specific name for the data containing the id for the data records. In this case, we'll name it region_id.

Get City Details

We will change the name of the request given from Xano to City Details.

You can see how we attach the variable city_id to the request. This is the variable we set before, in the Get All Cities request, as the value containing the ID of a particular city. We need to make sure that they're spelled the same way in both places, otherwise, our binding won't work.

In Parameters, enter the parameter city_id into the Key field. In the value field, enter a valid id from your database. This way, the request can return data.

Make sure the following data is selected.

Get Region Details

We will change the name of the request given from Xano to Region Details.

Finally, we'll create the request targeting the endpoint for the region details. Remember that this endpoint will also return the list of cities that belong to a specific region, depending on the region ID parameter we send in our request.

Now, make sure the following data is selected. You'll see how we select the city_id here as well, as we'll be using the Get City Details request to get the data of the cities that belong to each region.

We changed the name of .data.cities_id[] to City List to help us identify it in the data binding step.

Now that we have created the four requests, let's bind them to the screens for our app! 🚀

Bind the data to the screens

Now, we'll bind these four requests to the different screens in our app. Below, we show how the data binding must be done for each screen.

In Home screen will only have two buttons that navigate to other screens, so we don't need to bind any data here.

Remember that in "Regions Cities" screen, you will have to bind the container that contains the name of the city and the picture of the city to the City List.

Happy Bravorizing! 🥳

In the first part of the tutorial, we'll generate the database with Xano, and we'll define the API endpoints that will be used to connect later with Bravo. You'll need to create a Xano account .

We'll upload one picture per city as well. In the table, for each city, click on the Upload button in the "picture" field. You can upload any picture you wish, we used to search for license-free images from each city.

In the Xano free plan, the uploaded images will be watermarked. More information about the Xano Plans .

🗂️
here
Unsplash
here
Xano
LogoBravo Sample: World Cities Xano | FigmaFigma