Location Magic Text and Formatting

You can use Magic Text to access location properties or their sub-properties for using in creating, updating, filtering, or labeling inside your application.

Skill Level: Intermediate

Before You Begin

  • Ensure you have generated your Google API Key

  • Know about the Location property type

  • Know about Magic Text

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

  • Note that each time your app uses a location feature, your Google plan will be charged.

Walkthrough

Accessing the Location Property Itself

Whenever you have a field that is linked directly to a Location property in the database, you will have the option in Magic Text to only choose the Location option with an icon beside it. This represents the location value as a whole. For instance, when creating a new trip we might have a location property that will only accept a Location value.

Accessing the Sub-properties of a Location

By contrast, you can also access the sub-properties of a location as long as the field being filled is not tied to a location property type. For example, we can have a location's latitude be saved into a number field, or the location name be saved into a text field.

Location Sub-properties

PropertyType

Full Address

Text

Name

Text

Street Address

Text

City

Text

State/Region

Text

Country

Text

Postal Code

Text

Latitude

Number

Longitude

Number

Formatting

You can also build custom formatted locations by using the same property type, choosing a different piece of data, and combining it with static text. In the example below, we created a custom format that lists the postal code, then the city, then the latitude of the user's device - all using the same location property, just with different parts of the location.

With latitude and longitude, you can also format the way the coordinates are displayed to your end user, by clicking on the pencil icon in the red Magic Text bubble whenever latitude and longitude is displayed in an input. Decimal is the default formatting. To learn how to use latitude and longitude in formulas, please see this article.

Learn More

  • Only location property types can hold whole location data. All other property types can hold a location's sub-properties.

  • Check out our course in the App Academy about using Location.

Help

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

Last updated