Skip to main content

*ARCHIVE* How To: Default Value in Picklist Field

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.

category-empty

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.

default-value-filled

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.

picklist-field-properties

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.

guid-crystal-reports

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.

category-filled

Dean

Dean is a System Administrator at The House of the Good Shepherd in Utica, NY. He has been working with the myEvolv application since 2013.

One thought to “*ARCHIVE* How To: Default Value in Picklist Field”

Leave a Reply

Your email address will not be published. Required fields are marked *

We are using cookies on our website

Please confirm, if you accept our tracking cookies. You can also decline the tracking, so you can continue to visit our website without any data sent to third party services.