Giter Club home page Giter Club logo

pcf-addressfinder-widget's Introduction

PCF AddressFinder Widget

The PCF AddressFinder Widget is a PowerApps Component Framework (PCF) control for Dynamics 365 and Common Data Service (CDS) the uses the AddressFinder JavaScript Widget to search for New Zealand addresses.

Demo

Getting Started

To get a local copy up and running, follow these steps...

Prerequisites

Installation

  1. Signup for a free AddressFinder plan and get an API key
  2. Clone the repo
git clone https://github.com/ryanmichaeljames/pcf-addressfinder-widget.git
  1. Navigate to the src folder
cd src
  1. Install the NPM packages.
npm install

Resources

The following resources should be of help when contributing:

Usage

To install and use the AddressFinder Widget control within your Dynamics 365 or CDS instance, follow these steps...

Installation

  1. Download the latest release.
  2. Import the solution AddressFinderWidget_x_x_managed.zip file into your Dynamics 365 or CDS instance.
  3. Add the AddressFinder Widget control to the desired entity form.
  4. Add your AddressFinder API key to the API Key property. If you don't already have an API key you can register for a free account that gives you 500 free lookups a month.
  5. Map the entity's address attributes to the AddressFinder Widget's address properties.

There is a know issue where you cannot map account and contact address attributes to a PCF control's properties. Until this issue is resolved by Microsoft you can use the FormXml Manager plugin in the XrmToolBox to map the address attributes to the AddressFinder Widget control's properties. See Binding to Address Fields in a PCF Control.

Optional Properties

The following AddressFinder options are optional.

Property Type Default Description
Country Code String NZ The code of the country to search against. Supported country codes are NZ and AU.
Option: Empty Content String No addresses were found. This could be a new address, or you may need to check the spelling. Message to display to users when there are no found addresses or locations.
Option: Ignore Returns Boolean true Ignore the use of the enter key when no list item is selected.
Option: Max Results Integer 10 Maximum number of results to display.
Option: Show Addresses Boolean true Set to false to hide address results.
Option: Show Locations Boolean false Set to true to return location (street, suburb, city and region) results.
Option: Show Nearby Boolean false Enable the nearby address helper (uses device's GPS to suggest addresses at current location). This feature is only available for New Zealand addresses.
Option: Show Points of Interest Boolean false Set to true to return points of interest (e.g. hospitals, schools and churches) results. This feature is only available for New Zealand addresses.

For more information regarding the AddressFinder options see the options section of the AddressFinder Widget documentation.

New Zealand vs Australian addresses

By default, the AddressFinder Widget control will return New Zealand addresses, even if the Country Code input property is not set. To return Australian addresses the Country Code property must be set to AU.

There are a few subtle differences in the properties that are populated between New Zealand and Australian addresses. This is due to the AddressFinder API returning different properties in the search responses for each country. As a result, the following output properties are only populated by their respective countries.

Property Country
City New Zealand
Suburb New Zealand
Locality Australia
State/Territory Australia

Roadmap

See the issues for a list of proposed features (and known issues).

Contributing

Any contributions are more than welcome. ๐Ÿ˜„

  1. Fork the project
  2. Create a feature branch
git checkout -b feature/my-feature
  1. Commit your changes
git commit -m 'Added my feature'
  1. Push the feature branch to origin
git push origin feature/my-feature
  1. Open a pull request

Versioning

This project uses SemVer for versioning. For the versions available, see tags.

License

This project is distributed under the MIT License. See LICENSE more information.

Acknowledgements

pcf-addressfinder-widget's People

Contributors

ryanmichaeljames avatar

Watchers

 avatar  avatar

Forkers

cliveo spiffym

pcf-addressfinder-widget's Issues

Line 1 of address

Hi Ryan,

Great PCF Control!

I'm using it for Australian address lookups. There are cases when the control cannot find the address (address is in a new suburb or development). Is there any way we can have the Line 1 of the address mapped to a separate output parameter instead of the field that is being used for the PCF Control?

That way I can add the Address Lookup control to the address1_name field for example, then if an address is found I can map the address to the address fields as normal. If an address is not found I can manually type the address1_line1 field and input the rest of the address in.

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.