When creating custom fields in Microsoft Dynamics CRM Online, the most important step isn’t the field name, nor the placement on the form. The most important part of creating a custom field is selecting the correct data type. As CRM Online consultants at xRM (www.xrm.com), we work with clients in analyzing their data to ensure that the fields in which their data is entered are set up for optimal scalability and reporting capabilities.
In this post, we want to focus on two specific data types with similar sounding names but different uses: Option Set and Two Options. The former is a field that houses a predefined set of Options, sometimes referred to as a picklist or drop-down menu. The latter is quite simply a binary input.
One example of an Option Set could be a list of 50 Options representing the states of the USA. Such an Option Set is great for reporting because it prevents users from inputting inconsistent values intended to mean the same thing, compromising the data integrity. For example, three users could input the state in three different California addresses differently: “CA,” “Cali,” and “California”. This would become disastrous for reporting. Say a user were to run a report that asked, “Show me all accounts that are located in ‘CA.’” Accounts whose addresses had been recorded as “Cali” or “California” would not be returned as results, thus reporting a faulty number.
Two Options fields on the other hand can only house two inputs. By default, the values are “Yes” and “No,” though they can be modified. Two Options fields can also be rendered as radio buttons, a list, or a check box.
There we have it—two different data types for two very distinct purposes, right? Actually, in scenarios where the input seems to be only two values, it might not always be clear which data type to use.
A common mistake we see is administrators creating a Two Options field to collect data that seems like it only has two values but really needs three. Why is this a mistake? Let’s pretend the question is, “Do you like vegetables?” While this is a “yes” or “no” answer, configuring the attribute as a Two Options data type and displaying the field as a checkbox on the form means the input already has a default value, either checked or unchecked, yes or no. That would imply we’ve already asked the question and recorded the response. If the default is “No,” we assume no one likes vegetables until they indicate the affirmative. It also becomes impossible to know which records have indeed answered the question, since neither “yes” nor “no” means “unanswered”.
An Option Set allows administrators to create a field that has no default value and can still provide the user two options to choose from as input. In reality, no default selection means there is an additional (empty) input, which becomes the default. Such a field makes it clear which records have indeed indicated a response to either question we posed previously, because if the field is empty, it means the user hasn’t made a choice. If we also set the field as required on the form, we can force the user to make a purposeful choice, because a form cannot be saved while a required field is empty.
It may seem silly or superfluous to dwell on what appears to be a minute detail. But understand that once a data type has been specified for an attribute, it cannot be changed. To resolve a change from a Two Options field to an Option Set would require creating a new custom field, migrating previous values (if you deem them still reliable) to the new field, and updating any views, charts, dashboards, reports, workflows, mappings or other features that depended on the old field. That’s quite an effort to correct a mistake that seemed minute initially.
It’s very important to have an understanding of the purpose of a field before designing it. What questions will it answer? What workflows will it trigger? These are questions that xRM can help you answer if you need such assistance.
You can learn more tips, tricks, and tutorials for Microsoft Dynamics CRM, please check out our xRM blog and our Success Portal. If you would like to receive training from our team of experts, please inquire about our QuickStart Training.