NOTE: An updated version of this post for myEvolv NX is available here: How To: Default Value for Picklist Field
You may find that a myEvolv form that you wish to use contains a picklist field that cannot be done away with even though the user is always going to be selecting the same item. For instance, you may have a treatment plan for a program where there is only one category of goals but you have to select that category manually anyways. Just like other fields in myEvolv, you have the option of setting a default value for a picklist field but it is a little trickier to setup than it is for text and date fields. Defaulting values for picklist fields where there are no real choices to be made will save your clinicians time when doing their work in myEvolv.
Some picklist fields have both a button that opens the picklist dialog and a place to type a code, which allows for faster entry for users who know the codes.
You might think that you can designate a default value in the form designer in the same way that you designate a default value in a text field since there is a sort of text field available. If you try that, however, you will find that this does not work. The difference is that this field is actually used to store a foreign key value and so the default value must be a foreign key (the GUID) and not the description or code values for the item that you wish to default in. Remember to place it within single quotes as you would a default text value.
In my example, I needed the GUID for a custom treatment category named “Day Treatment”. Looking at the field properties for this picklist field, I see that the Lookup table that is being used is ‘Problem Category Lookup – Not Safety Plan’, which tells me that I need to take a look at the ‘problem category’ table.
I pulled that table into Crystal Reports and made a quick and dirty report that shows the problem_category_id and the description and grabbed the GUID that corresponds with my Day Treatment category.
With the GUID used as the default value on the picklist field, now ‘Day Treatment’ is the default value on the treatment plan whenever a new Category component is added to the treatment plan.