Select Page

A new knowledge base article has been published on our support portal.

Scenario Overview

This example shows how to set up a Multi-Sheet Decision Table to apply the residency rules that full-time students attending Oxford University must adhere to.

The documentation for these requirements can be found under Place of residence here.

These rules require that a student live within a certain distance of the Carfax Tower as it considered to be the center of Oxford City.

In order to work out the distance between the Student’s address and Carfax Tower we use the Locations API in Bing Maps to geocode the Students postcode and then use the Haversine function to calculate the distance in miles from the target point.

Undergraduate Students

Undergraduate students must live within 6 miles of Carfax Tower.
This limit is increased to 25 miles if:
  • You hold the status of Senior Student
  • Already have an undergraduate degree from Oxford
  • Reside in the home of your parent / guardian
Graduate Students

Graduate students must reside with 25 miles of Carfax unless given
special permission to work away from Oxford for a period.
Dispensation

You may apply for dispensation from the residence limits set out above to your college or other society,
who will apply to the Proctors’ Office on your behalf, together with a written statement of support.
A statement of support from your department or faculty is also required. Applications received directly
or without the necessary support will not be considered.

To accommodate these business rules we have added the following fields to the Contact entity in CRM.

Calculations : 

DistanceCalc

SmartFlow(

  SetVar('Result1', GeoCodeBing('', '', '', [contact.address1_postalcode],'')),
  SetVar('Lat1', Split(GetVar('Result1'), '