# Formula Gallery

Each chart in Spotlight contains a formula to calculate the values shown. With the Formula Gallery, you can access and amend these formulae and save them for later use in your organisation or practice.

## Formula types

There are three different formula types available.

**Default**Â - The standard formulae available in Spotlight. Â The default formulae are available in all organisations.**Practice**Â - A formula you've created and made available to all of your organisations.**Organisation**Â - A formula you've created and made available to only the current organisation. Â

## Formula hierarchy

With the Formula Gallery, you can create formulae with the same name as those that already exist in Spotlight. Â If you have more than one formula with the same name, these are used in a specific order.

**Organisation**Â - Formulae you create for the specific organisation always take priority for that organisation. Â If you save a formula for a specific organisation, and this uses the same name as a Practice or Default Formula, the organisation copy is used.**Practice**Â - Formulae you create for your practice take priority over default formulae. Â If you save a formula for the practice, and it uses the same name as a default formula, the practice copy is usedÂ**unless**Â a particular organisation has its own copy of the formula.**Default**Â - If you haven't created a specific Organisation or Practice formula, the default formula is used. Â You can override default formulae at either the Organisation or Practice level, by saving a new formula with the same name.

If you create your own custom formulae, and later delete them, the Default formulae will be used again.

## Create a new formula

**Note:Â **You can also create a formula from within most standard chartsÂ and withinÂ custom charts.

### For the whole Practice

**Note:** To be able to save formulae for use in the whole practice, you must have the right user role. Â If you can't see the Formula Gallery option when you access the Settings option for your practice, or don't have the option to save a practice formula, you don't have the right user role to work with Practice level formulae.Â

- From the main Spotlight screen, open the Settings menu then choose Formula Gallery.Â
- Click Create New Formula, then use the formula builder to create the required formula.
- Click Save As, then enter a name for your formula.
**Note:**If you enter a name already in use for a default formula, your own formula takes precedence in all organisations. If you enter a name already in use for another custom formula, the existing one is replaced. - If required, enter formula tags.
- To save the formula, click Save.

Your new formula appears on the list as a Practice formula and is available to use in charts in all of your organisations.

### For a single Organisation

- From the main Spotlight screen, click the Settings link under the organisation name.Â
- Click the Formula Gallery tab, then click Create New Formula.
- Use theÂ formula builderÂ to create the required formula, then click Save As.
- From the Available to drop-down list, choose Organisation. Â If you choose Practice, the formula is available to the whole Practice.
- Enter a name for your formula. Â
**Note:**If you enter a name already in use for a default formula, your own formula takes precedence in this organisation. If you enter a name already in use for another custom formula, the existing one is replaced. - If required,Â enterÂ formula tags.
- To save the formula, click Save.

Your formula appears on the list as an Organisation formulaÂ and is available to use in charts in this organisation.

## Edit a formula

**Note:Â **You can also edit a formula directly from within mostÂ standard chartsÂ and withinÂ custom charts.

- From the main Spotlight screen, open the Settings menu then choose Formula Gallery.Â
- Locate the formula you want to amend, then click the Copy and Edit button.
- Use theÂ formula builderÂ to amend the formula, then click Save As.
- Enter a name for your formula.
**Note:**Â If you enter a name already in use for a default formula, your own formula takes precedence. If you enter a name already in use for another custom formula, the existing one is replaced. - If required,Â enterÂ formula tags.
- To save the formula, click Save.

## Delete a formula

**Note:Â **Once you delete a formula, this can't be undone. If you need the formula again, you must recreate it.

### To delete a Practice formula

- From the main Spotlight screen, open the Settings menu then choose Formula Gallery.Â
- Click the Delete button, then to continue, click Delete. Â

### To delete an OrganisationÂ formula

- From the main Spotlight screen, click the Settings link under the organisation name.Â
- Click the Formula Gallery tab, then click the Delete button.Â
- A confirmation message appears. Â To continue, click Delete.

## Formula tags

When you create a formula, you have the option to enter formula tags. Â You can use these later to search for the formulae you need. Â Simply enter the name of the tag into the search box.

Â

**Note: **Formula tags can't contain spaces, so if you need to use more than one word you can separate them with an underscore.

Â