Creating a Formula to Record Postcodes
Updated Apr 23rd, 2024
Who is this guide for?
Case Management Supervisors and System Supervisors
This guide will demonstrate how to split a postcode into individual characters by using a formula
Please note that this guide assumes you have knowledge of Case Management
Supervisor in relation to formulae. Please see Add and Use Formulae here >
Some forms require the post code to be split into separate characters as below:
Osprey stores the post code as one field, so you will need to create a formulae within Osprey which can be used to calculate a value based on other Osprey values.
These can then be displayed on dossier pages if required, or they can be used to link directly from the formula list in your letters or forms.
We will need to create 8 formulae here to work out each separate character of the post code.
Creating the formula
Navigate to the ‘Supervisor’ area of Osprey and select ‘Case Management Setup’. Now select ‘Formulae’.
You will need to set up the 8 separate postcode character formulae as follows:
The LEFT function allows us to get the specified number of characters from the left of the field – in this case 1 to only display the 1st character of the post code.
The MID function allows us to get characters from the middle of the field given a starting position, and number of characters. The first character in the field is character 0, so the formula Mid({!CLIENT.POSTCODE}, 1, 1) tells the system to look at the client postcode, second character, and return only one character from there.
If you wish, once the formula has been created, you can link these to new dossier fields. Please see Creating new Dossier Fields and Pages here >
This is not necessary if you only want to use these fields in letters or forms however.
If this is required, create these as POSTCODE1 through to POSTCODE8 set them as type ‘Formula’ and choose your relevant newly created formula.
The dossier page
If you wish to create a dossier page to view the results, as there are going to be 8 fields we don’t want to clutter other dossier pages with this information. You can create this as a client level dossier page. Link all the fields created above to this page, Design the page and save your changes.