How to create an option set (choice list)
Create a reusable choice list with a colour and an icon for each value, use it on a field, and see the colours in the form and in every view. How-to video H019, step by step.

How-to H019 · 3 min 15 s. A complete tutorial: every option, colour and icon the video uses, the field that uses the set, and the document the platform saves. Every picture is a frame of the video.
An option set is a list of choices you define once and use on as many fields as you like. In this tutorial you make Lead source, which says where each opportunity came from, with a colour and an icon for each choice, so a list of records reads at a glance.
Before you start
- The Sales Tracker solution and its Opportunity table, from How to add a field to a table.
- Two opportunities to try it on. The video uses Contoso fleet renewal and Northwind renewal. Create them in the Sales Tracker app with New if you don't have them.
Part 1: Create the option set
1.1 Name it
- Open Solutions, then Sales Tracker, and select Option Sets. Sales stage may already be there, from H017.
- Select New.
- Type the name:
Lead source. The logical name fills in from it:tsp_leadsource.
Read the note. Fields refer to the set by its logical name, so it can't be changed after you save.
1.2 Add the choices
- Under Options, type the first choice:
Website. - Select the square beside it to set a colour. Pick blue. The panel closes.
- Select the round button to set an icon. Search for
globeand pick it. - Select Add option for each of the others, and give each its colour and icon:
| Option | Colour | Icon |
|---|---|---|
| Website | Blue #3b82f6 |
Globe |
| Referral | Green #22c55e |
Handshake |
| Event | Orange #f97316 |
Calendar |
| Partner | Purple #8b5cf6 |
Users (people) |

1.3 The values
Each choice says assigned on save. You don't type its number: the platform gives each one the next number from your publisher's range. The numbers never change, and a record stores the number, not the label, so renaming a choice later is safe.
1.4 Save
Select Save. Lead source joins Sales stage in the list. Open it again to see the numbers it was given.
Part 2: Use it on a field
-
Open Tables, then Opportunity, and select New.
-
Fill in the panel:
Box Value Display name Lead sourceData type Option set Option set Lead source -
Select Save.
A field and its option set can share a name: they are different things. A second field, on this table or another, can use the same set.
Part 3: Put it on the form and in the view
- Select Forms and open Information. Drag Lead source in, above Sales stage, and select Save.
- Select Views and open All Opportunities. Drag Lead source into the columns and select Save.
Part 4: Use it
- Open Sales Test's address, open Sales Tracker and open Contoso fleet renewal.
- Open Lead source. Each choice shows its colour and its icon.
- Pick Referral and select Save & Close.
- Open Northwind renewal, pick Website and save it too.
In the view, each lead source reads in its own colour, with its icon: green for the referral, blue for the website.

The option set as text
The saved set is one document. The numbers are your publisher's base plus one, two, three, four. With Tailspin Toys' base of 270210000:
{
"logicalName": "tsp_leadsource",
"displayName": "Lead source",
"publisherPrefix": "tsp",
"optionValueBase": 270210000,
"options": [
{ "value": 270210001, "displayName": "Website", "color": "#3b82f6", "icon": "Globe" },
{ "value": 270210002, "displayName": "Referral", "color": "#22c55e", "icon": "Handshake" },
{ "value": 270210003, "displayName": "Event", "color": "#f97316", "icon": "Calendar" },
{ "value": 270210004, "displayName": "Partner", "color": "#8b5cf6", "icon": "Users" }
]
}
Your numbers may differ: read them on the option set. The field points at the set by name:
{ "logicalName": "tsp_leadsource", "displayName": "Lead source", "dataType": "OptionSet", "optionSet": "tsp_leadsource" }
A script reads and writes the number. For example, to mark an opportunity as a referral in BS Lang:
updateRecord("tsp_opportunity", getRecordRef("record"), { "tsp_leadsource": 270210002 })
If something goes wrong
- Lead source isn't offered when adding the field. The set wasn't saved, or it is in another environment.
- The colours don't show in the list. The field isn't in the view. Check Part 3.
- "Option … cannot be removed: records still hold this value." Change those records to another option first. A removed option's number is retired and never handed out again.
What you built
A coloured choice on the form and in the list, defined once. A second field can use the same set, and a new value added to it appears everywhere at once.
Read more
- The help page: Create an Option Set, the page this screen's Help link opens.
- The feature, explained: Option sets: reusable choice lists, with colours and icons.
- The next how-to: How to add a lookup to another table.
- Every how-to: the How-tos category.
Is there a task you would like to see done step by step? Tell us. parsware.com/contact