Adalo Resources
Sign Up for Adalo
Adalo Resources
Adalo Resources
  • 🚀Getting Started
  • 🎨Design
    • Designing Your App
      • Definitions and Terms
      • Creating an App
      • Using the Screen Size Switcher
      • Building with Sections
      • Alignment Tools
      • Using the Layout Tab
        • Screen Size Visibility
        • Sticky While Scrolling
        • Shared Layout Settings
        • Custom Layout Settings
      • Grouping Components
      • Responsive Navigation
        • Responsive Side Navigation
          • Side Navigation
          • Title
          • Menu Style
          • Menu Items
          • Bottom Button
          • Profile Section
        • Responsive Top Navigation
          • Navigation Bar
          • Title
          • Menu Items
          • Additional Navigation
          • Profile Image
      • Responsive Design Best Practices
    • Branding
      • Colors
      • Fonts
    • Create Component States
    • Preview Your App
    • Design Versions
    • Additional Design Resources
    • Migrating Legacy Apps
    • Legacy Builder
      • Create Component Containers
      • Positioning Components
      • Arranging and Grouping Components
      • Preview your App (Legacy Builder)
  • 🎬Actions
    • Action Basics
    • Links
    • Change Data
    • Notifications
      • Request Notification Permission in Your App
      • Trigger Push Notifications
      • Testing Notifications
      • Troubleshooting Notifications
        • Notifications Not Working on Android
        • Notifications Not Working on iOS
        • Notifications Not Working on PWA
    • Conditional Actions
    • Permissions
    • App Authentication
  • 🛠️Screens and Components
    • Screens
      • Deep Linking
      • Deep Linking With Data
      • Deep Linking Share Action
      • Deep Linking Redirection & Fallbacks
    • Screen Navigation
    • Component Basics
    • Magic Text
      • Logged-In User vs. Current User
      • How to Format Dates and Numbers
      • Sums, Counts, Averages, Min and Max
      • How to Create a Custom Math Formula
        • Complex Calculations
    • Conditions and Filtering
      • Filtering in Adalo
      • Using Conditions in Adalo
    • Changing a Component's Visibility
    • Lists
      • Sorting and Filtering Lists
      • Creating Custom Lists
      • Lists of Lists
    • Buttons
    • Toggles
    • Forms
    • Simple Components
      • Image Component
      • Text Input
      • Webview Component
        • Troubleshooting Webview
          • Webview URL not loading in Adalo App
          • Webview crashing in Native App
    • Table Component
    • Video Component
    • Marketplace Components
      • How to Add Components from the Marketplace
      • Digital Purchases for In-App Purchases
      • Sign in with Google
      • Sign in with Apple
      • Maps
      • Bar Charts and Line Graphs
      • Pie Chart
      • Google Admob
        • Troubleshooting Admob
          • Ads Not Displaying in Native
      • Calendar
      • Progress Bar
      • Star Rating
      • Stopwatch
      • Slider
      • Lottie Files
      • YouTube
      • Audio Player
        • Troubleshooting Audio Player
          • Apple App Rejection: UIBackgroundModes key
      • Deck Swiper
      • Markdown Renderer
      • Signature
      • Stripe
        • Stripe Payment
        • Stripe Subscription
        • Stripe Connect Marketplace
          • Set up your Stripe Account for Stripe Connect
          • Allow Merchants to Connect their Stripe Account to your App
          • Stripe Connect
          • Stripe Marketplace Payment
        • Configuring Stripe Test Mode
        • Stripe Custom Actions
          • Get Stripe Subscription Data
          • Get Stripe Customer Data using Email Address
        • Legacy Stripe Components (Deprecated)
          • Marketplace Payments
            • Set up your Stripe Account for Stripe Connect
            • Allow Merchants to Connect their Stripe Account to your App
            • Configure Consumer Payment to go to Merchants' Accounts
          • One-time Card Payments
          • Subscription Payments
  • 🧱Feature Templates
    • Browse, Purchase, and Manage Classes
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Category List Screen
      • Classes List Screen
      • Class Details Screen
      • Purchase Screen
      • Congrats Screen
      • Admin Manage Clinics Screen
      • Admin Transactions Screen
      • Admin Create Clinic & Admin Edit Clinic Screens
    • Browse, Purchase, and Manage Events
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Browse Classes
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Category List Screen
      • Classes List Screen
      • Classes Details Screen
    • Classes Admin Dashboard
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Admin Manage Clinics Screen
      • Admin Transactions Screen
      • Admin Create Clinic & Admin Edit Clinic Screen
    • User Chat
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Conversations List Screen
      • Chat Screen
      • New Chat Modal Screen
    • Forum
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Group Messaging
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Messaging Screen
      • Edit Message Modal Screen & Edit Channel Modal Screen
      • Search Messages Screen & Channels Screen
    • Account Settings
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Account Settings Screen
      • Success Modal Screen & Delete Account Confirmation Screen
    • Appointment Booking
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Coaches Screen
      • Time Slots Screen
      • Book Appointment Screen
      • Coach Admin Screen
      • Edit Session Screen
    • Assign Tasks
      • Overview — Screens, Database, Layout Settings, Use Cases
      • My Tasks Screen, Team Tasks Screen, Completed Screen
      • Task Detail Screen
      • Edit Task Screen
    • Agree and Sign
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Terms Screen
      • Agree & Sign Modal Screen
      • Signatures Admin Screen
    • Announcements & Notifications
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Notifications Screen
      • Notify All & Notify One Screens
    • User Profile & Account Settings
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Setup Step 1 Screen
      • Setup Step 2 Screen
      • My Profile Screen
      • Additional Screens
    • Browse Users
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Browse Members & Profile Screen
    • Browse Dates
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Time Slots & Workout Screens
    • Browse Home Listings
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Listings Screen
      • Listing Detail Screen
      • Modal Image Gallery Screen
    • Image Carousel
      • Overview — Screens, Database, Layout Settings, Use Cases
      • Screens
    • Image Gallery Modal
      • Overview — Screens, Database, Layout Settings, Use Cases
    • User Admin Dashboard
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Workout Assignment
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Social Media Feed
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Store with Shopping Cart
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Inventory Management
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Video Gallery & Upload
      • Overview — Screens, Database, Layout Settings, Use Cases
    • Restaurant Ordering
      • Overview — Screens, Database, Layout Settings, Use Cases
  • 🗃️Database
    • Database Property Types
    • Relationships
      • One-to-Many vs. Many-to-One
      • Many-to-Many
    • The User Collection
    • Collection Permissions
    • Importing Records from a CSV File
    • Download your Collection as a CSV File
    • Location
      • Getting Your Google API Key
      • Estimating Google API Usage
      • The Location Property Type
      • Location in Forms and Inputs
      • Location Magic Text and Formatting
      • Getting the User's Location
      • Latitude, Longitude, and Special Formulas
      • Comparing Locations
      • Troubleshooting Location Features
  • 🪄Settings
    • Copying vs Cloning your App
      • How to Copy and/or Delete an App
      • Cloning Apps and Making Apps Cloneable
  • 🚀Performance
    • Builder Performance Tips
    • Optimize App Performance
      • Image Optimization
      • Five Tips for Improving Your Adalo App Performance
  • ✍️Publishing Apps
    • Publishing to the Web
      • Publish to Adalo Subdomain
      • Publish to Custom Domain
      • Troubleshooting Domain Setup
        • Custom Domain is Not Secure
        • Domain Could Not be Verified
        • Error: Not Found
    • Publishing to the Google Play Store
      • Create Your Google Developer Account
      • Create your Firebase Project
      • Register Android App & Download Config File
      • Generate & Download Private Key
      • Get your Build file
      • Create New Google Play Listing
      • Upload your Build file to Google Play Listing
      • Finalize Listing and Release App
      • Troubleshooting Android Release
        • Google Play rejected the app due to data safety issues
        • Error: Android App Signed with Wrong Key.
        • Error: Version Code 'xxx' has already been used. Try another Version code.
        • Error: Package Name already exists in Google Play.
        • Error: Upload a valid app bundle.
        • Error: Existing Users Can't Upgrade to New App Bundles.
    • Publishing to the Apple App Store
      • Create Your Apple Developer Account
      • Setup Annual Payment for your Apple Developer Account
      • Create Your Apple Bundle ID
      • Create Your Adalo ‘App-Specific Password’
      • Start your Build in Adalo
      • Add Users to Your App Store Connect Team
      • Add Users to Testflight
      • Creating Screenshots for the App Store
      • Privacy and App Tracking Transparency
      • Troubleshooting iOS
        • Build Error: You have reached the maximum number of certificates
        • Build Error: You have already reached the maximum allowed number of keys for this service
        • Build Error: Distribution certificate has expired
        • Build Error: Asset Validation Failed - Invalid App Store Icon
        • App Rejected: Add Permission Text to Your iOS Build
        • Delivery warning during the app submission process: ITMS-90899
        • iOS Build Not Showing in Testflight
        • Apple Two-Factor Authentication Error
    • Publishing to the Web (Legacy Apps)
    • Uploading .APK (Legacy)
    • Publishing FAQs
    • Troubleshooting
      • Build Stuck in Queue
  • ▶️Videos
    • Getting Started
    • Full Walkthrough
    • Working with Data
    • Designing your Database
    • Custom Lists
    • Changing Component Visibility
    • Forms
    • Ordering & Payments
    • Math & Custom Formulas
    • Chat
  • 👩‍🏫Tutorials
    • How to Use Keyboard Shortcuts
    • How to Embed Video or Audio (YouTube, Vimeo, SoundCloud)
    • How to Share a Database Between Apps
    • How to Create an Empty State
    • How to Create a Search Bar
    • How to make a list your users can filter
    • How to Create a Modal/Popup Window
    • How to create a "Favorite" button (Legacy Builder)
    • How to add an Image to an App Bar
    • How to send Scheduled Push Notifications
    • Start Maps Navigation in Your Adalo Apps Using Google Maps, Apple Maps, or Waze
    • Generating Map Previews in Your Adalo App Using the Google Static Maps API
    • Special Links: Email, Text (SMS), and Phone
    • How to have a Dropdown Menu in a Form
    • How to Setup a Shopping Cart with Payments
    • How to set up a Public Profile screen for Users
    • How to Allow Users to Follow Others
    • How to have a Form Automatically Set a Relationship
    • How to add Chat to your App
    • How to Create Multi-Sided Apps
    • How to Add an "Add to Calendar" Button for Events
    • Forwarding Domain to Root Address
    • How to Create Temporary User Avatars
    • How to Set Up a Social Media List
    • How to Play Your Spotify Podcast in Adalo’s Audio Player
  • 🧩Integrations
    • The Adalo API
      • Collections API
      • Send Push Notifications via API
    • Xano
      • Setup Your Xano Workspace
      • Connect Xano with Private Swagger
      • Connect Xano to an Adalo App
      • User Signup, Login, Authentication
      • Google Sign In with Xano Database
      • Other Collections
      • Working with Data Types in Adalo and Xano
      • Counting Records with Xano
      • Lists and Pagination
      • Xano Response
      • Xano Tips and Tricks
      • Troubleshooting
    • Accessing your Record ID
    • Custom Actions
      • ✨Power Your App with ChatGPT
    • External Collections with APIs
      • Magic Text in External Collections
    • Airtable
      • Connecting to Airtable
      • Adding/Deleting Properties
      • Displaying Images
      • Working with Lists
        • Images In Lists
        • Filtering Airtable Lists
        • Magic Texts in Lists
        • Limiting the Number of List Items
        • Sorting Airtable Lists
      • Working with Forms
        • Airtable Dropdown fields & Validation
      • Working with Attachments, Images and Airtable relationship Fields
      • Relationships & Airtable Collections
      • Debugging
    • DreamFactory
    • Zapier
    • Make (Formerly Integromat)
      • Create a PDF from a record in Adalo
      • Notification in Slack when a new user registers in your Adalo app
      • Send verification email to new sign ups
      • Send a verification SMS to new sign ups
      • Send a file to Google Drive from Adalo
      • Send new files from a Google Drive folder to an Adalo collection
      • Use Google Vision for OCR an image and store the text results in an Adalo record
    • IAPHUB
    • Mixpanel
    • Troubleshooting the Adalo API
      • List inside of a List not loading
      • Error Codes
  • ⚙️Adalo Account
    • Account
      • Updating Email and Password
      • Enabling Developer Mode
    • Team Members
      • Add Team Members to Your Adalo App
    • Apps
    • Usage and Billing
      • Billing, Invoices, and Payments
      • App Actions Dashboard
    • Domains
      • Resetting SSL
  • ❓FAQs
    • General Questions
    • What can Adalo do?
    • Adalo Pricing: FAQs
    • Adalo Account: FAQs
    • Adalo Subscription Add-Ons
    • Working with an Adalo Freelancer
    • Adalo Experts
    • Adalo Affiliate Program
    • Adalo Pricing: Legacy Accounts
  • 🤔Troubleshooting
  • 📚Additional Resources
    • Adalo App Academy
      • Introduction to Apps
      • Strategy and Business
      • Design
      • Build
      • Launch & Iterate
      • Freelancers & Agencies
      • All Courses
    • App Development Cost Calculator
    • Hire an Adalo Expert
    • Adalo Forum
  • 📖Glossary
Powered by GitBook
On this page
  • Before You Begin
  • Walkthrough
  • Learn More
  • Help

Was this helpful?

  1. Database
  2. Location

Comparing Locations

You can use location magic text in filtering, sorting, conditional actions, and conditional visibility to show locations based on different factors or even the user's device location.

PreviousLatitude, Longitude, and Special FormulasNextTroubleshooting Location Features

Last updated 1 year ago

Was this helpful?

Skill Level: Expert

Before You Begin

  • Ensure you have generated your

  • Know about the and

  • Know how to get the

  • You will need a paid Adalo plan to use this feature.

  • Know about

  • Note that each time your app requests user location, your Google plan may be charged.

Using browser languages other than English may break filtering rules.

Walkthrough

Sorting Lists Based on Location

1.) You can sort lists based on the distance or proximity of two locations or a static number. To do this, click on the list you want to sort and make sure the connected collection has a location property. Here we have a list of Trips:

2.) Next, click the Sorting dropdown and select the Location option that best describes the order that you want to sort in. Our our case, we want to show Trips that are closest to the user, so we'll choose Closest to Farthest.

3.) Now we need to select the location we want to compare the list items to, which in this case is the user's device location. In the Sort in relation to dropdown we're going to choose Current Device Location. It will also ask us to search for and input a Fallback Address. The fallback address will be used if the referenced sorting location cannot be found. In our case, the fallback address would be used if the user's device location could not be determined.

NOTE: If the fallback address is left empty and the user's device location cannot be determined or they did not give permission, the list filtering will be ignored.

4.) You can also choose information from the Logged in User's record or search for and use a Custom Location as well. Just note that the Custom Location will always stay the same.

Filtering Lists Based on Location

1.) We can also filter lists based on location(s) as well. In the case of our list of Trips, I may only want to show Trips that are in the same City as the user. To do this we will select the list, then click on + Add Custom Filter.

2.) In the Magic Text options we'll choose Location > City.

3.) We'll leave the operator set to Is equal to and set the second dropdown to the Current Device Locations's > City.

4.) Alternatively, we can also use the location property directly instead of using the location's sub-properties. Let's say we wanted to only show Trips within a certain distance of the user's location. We can do that too. Let's add another custom filter by clicking the +Add Custom Filter button again.

5.) This time, in the filter dropdown, click the Location option with the icon next to it.

6.) We have some new options here. In the second dropdown we can select either Is within or Is not within. Let's choose Is within.

7.) Now let's set the radius distance and the unit of measurement we want to use for comparison. We're going to choose 30 Miles, but you can also use Magic Text here as well if you wish.

8.) Lastly, let's choose the second location we're comparing the first one with, which in the case of our Trips scenario is the user's device location. Let's choose Current Device Location from the dropdown.

9.) Now our list of Trips is filtered so that it will only show Trips that are in the same city as the user, or are within 30 miles of the user.

Using Locations in Conditional Actions and Visibility

We can also apply these same filtering options to conditional visibility and conditional actions. We have the exact same set of options available in both cases, except that we can only apply one filter at a time. For example, we have some conditional visibility below that will only show the label if the user is within 1 mile of the current trip's location:

In the final example below, the button action only occurs if the current trip's city is equal to the user's device location's city.

Learn More

  • You can also apply location filtering logic to Counts as well.

  • Filtering and sorting can be used on custom lists as well as all of the preset list types.

Help

Check out our about using Location.

If you need additional help with this article, you can always ask in our ! Be sure to paste the link to this article in your post as well!

🗃️
course in the App Academy
community forum
Google API Key
location property type
location magic text
user's device location
conditionals and filtering