DEV Community

Jaime López
Jaime López

Posted on • Originally published at intranetfromthetrenches.substack.com

Build a Real Estate Listing App in Minutes: Power Apps & SharePoint

This article dives into a practical application of the SharePoint Location column, building a real estate listing app with Power Apps.

Imagine the benefits:

  • Visualize Your Portfolio: See all properties on a map, giving realtors a clear picture of geographical spread and property density.
  • Mobile Accessibility: Access property details and navigate listings directly from a mobile device for ultimate convenience.

Property Lens application

This app leverages the ease of use of both Power Apps and SharePoint. We'll use:

  • Microsoft Lists: Manage your real estate property data with a user-friendly list.
  • Power Apps: Build a custom application in minutes, no coding required.
  • Bing Maps Connector: Transform addresses into visual pins on the map.

Ready to get started? Follow along as we explore this step-by-step guide. You'll be amazed at how quickly you can create a powerful real estate listing app that empowers your realtors!

Microsoft Lists, Your One-Stop Shop for Property Data

Microsoft Lists provides the perfect foundation for our real estate app. A single list is all you need to manage your property information.

Just like I did, you can easily create a list called "Real Estate Properties" with these essential columns:

  • Title: Give each property a clear and descriptive name using the default "Title" column.
  • Description: Dive deeper with a dedicated "Text" column for a full property description.
  • Price: Showcase the asking price with a "Currency" column, ensuring easy price visualization.
  • Location: This is where the magic happens! The "Location" column allows you to set the geocoordinates for each property, turning addresses into mappable points.

Real Estate Properties list in Microsoft Lists

Now for the fun part - adding your properties! Whether you have 10 listings like me, or hundreds, be sure to accurately enter the location data in the "Location" column. This ensures your properties appear correctly on the map later.

Building the App with Power Apps: Unleashing the Power of Location

Now, let's build our real estate app in Power Apps! Here's what it offers:

  • Interactive Map: Navigate through your listings with ease.
  • Property Markers: Easily identify each property on the map with clear pins.
  • Property List: View all properties in a clear, visual format.
  • Centering on Selection: Click a property on the list, and the map zooms in to its location – super user-friendly!

Creating this app is surprisingly simple with Power Apps' standard controls. Labels, galleries, and icons are your building blocks. Let's dive into the key aspects.

Connecting the Dots: Data Sources

  1. Microsoft List: We'll use this list as our primary data source, storing all your property information.
  2. Bing Maps Connector: This bridge translates addresses from the "Location" column into map-friendly geocoordinates.

Property Lens Power Apps Data Sources

Important Note: The SharePoint connector doesn't natively return geocoordinates from the "Location" column. Here's where Bing Maps comes to the rescue!

Unlocking Bing Maps Magic

We leverage the Bing Maps connector to transform property addresses into geocoordinates. For each property in your SharePoint list, the connector takes the address components (street, city, country) and converts them into usable coordinates.

To use this connector, you'll need a free Bing Maps API key, easily obtainable from the Bing Maps website. Simply select the Bing Maps connector within Power Apps, enter your key, and you're good to go!

Creating a Geocoded Collection

We'll create a new collection called SharePointRealStateProperties with enhanced data. This code snippet demonstrates the process:

// Create a new collection adding the geocoordinates from Bing Maps
ClearCollect(
    SharePointRealStateProperties,
    ForAll(
        'Real State Properties',
        {
            Title: Title,
            Description: Description,
            Price: Price,
            Address: {
                Line: 'Location: Street',
                Locality: 'Location: City',
                PostalCode: 'Location: Postal Code',
                CountryRegion: 'Location: Country/Region'
            },
            Location: BingMaps.GetLocationByAddress({
                addressLine: 'Location: Street',
                locality: 'Location: City',
                postalCode: 'Location: Postal Code',
                countryRegion: 'Location: Country/Region'
            }).point.coordinates
        }
    )
);
Enter fullscreen mode Exit fullscreen mode

Notice the new Location column within the collection. This stores the geocoordinates retrieved from the Bing Maps request for each property. Now, the SharePointRealStateProperties collection holds all the information the map needs.

Adding Property Markers

Next, we'll populate the map with markers, one for each property. This code snippet iterates through the SharePointRealStateProperties collection and extracts the necessary details for the map:

ClearCollect(
    Markers,
    ForAll(
        SharePointRealStateProperties,
        {
            Label: Title,
            Description: Description,
            Latitude: Location.latitude,
            Longitude: Location.longitude
        }
    )
);
Enter fullscreen mode Exit fullscreen mode

Configuring the Map Control

With the marker data ready, configuring the map control becomes a breeze:

  • Items: Set to the Markers collection to populate the map with pins.
  • ItemsLabel: Set to the Label text to display property names on the map.
  • ItemsLatitudes & ItemsLongitudes: Set to Latitude and Longitude values respectively, for accurate marker placement.

Interactive List with Map Centering

A gallery control makes displaying the property list a breeze. Simply bind it to the SharePointRealStateProperties collection for automatic data population. Customizing the gallery template lets you showcase relevant property details.

Here's the cool part: centering the map on a selected property. When a realtor clicks on a property in the list, two variables capture its latitude and longitude. These are then used to center the map on that specific property – simple yet powerful!

// When clicking in a real state property, latitude and longitude are set so the map is centered on it.
Set(CurrentLatitude, Text(ThisItem.Location.latitude));
Set(CurrentLongitude, Text(ThisItem.Location.longitude));
Enter fullscreen mode Exit fullscreen mode

Advanced Features for Realtors

Here's how to take your real estate app to the next level with some powerful features:

  • Customizable Icons: Go beyond the default pins! Assign unique icons to different property types (houses, apartments, commercial spaces) for instant visual recognition on the map.
  • Color-Coded Pins: Leverage color to categorize properties. Highlight recently listed properties, available rentals, or price ranges with distinct pin colors.
  • Filter by Property Type: Empower realtors to quickly focus on specific property types. Integrate a filter option that allows them to narrow down the map view based on their needs.
  • Customizable Filters: Expand the filtering capabilities! Allow realtors to filter by additional criteria from your SharePoint list, like price range, square footage, or amenities.
  • Dedicated Detail Screen: Provide a dedicated screen where realtors can delve into the specifics of each property. Include high-quality pictures, detailed descriptions, and key information like square footage and number of bedrooms.
  • Contact Integration: Make it easy for realtors to connect with potential clients. Integrate contact buttons that allow them to directly call, email, or schedule a viewing from the property detail screen.

These are just a few ways to enhance your real estate app. By incorporating these features, you can equip your realtors with a powerful tool to streamline their workflow and make informed decisions.

Conclusion

This project demonstrates the incredible synergy between Microsoft Lists (or SharePoint Online) and Power Apps. In a single day, we built a valuable real estate application! Imagine the possibilities – feature-rich apps developed in just weeks to empower your users.

With just a few clicks, we transformed a simple list into a user-friendly web application with core functionalities. This showcases the power of Power Apps for creating location-based solutions that streamline workflows and enhance user experiences.

Have you explored the Map control in Power Apps? Share your thoughts and ideas for location-based apps in the comments below!

References

Top comments (2)

Collapse
 
tanaka_chindakuda_2b2c903 profile image
Tanaka Chindakuda

Thank you thank ,eish this is great l want to try .

Collapse
 
jaloplo profile image
Jaime López

Thanks for your words. Let me know any issue or note on your work ;)