DB Dropdown fields on form are not populating correctly
search cancel

DB Dropdown fields on form are not populating correctly

book

Article ID: 13716

calendar_today

Updated On:

Products

CA Harvest Software Change Manager - OpenMake Meister CA Harvest Software Change Manager

Issue/Introduction

I have a dbcombo drop down list box on my custom form that is populated with a sql query to a separate table in my Harvest database containing the values for the list.  This way if the list changes I don't have to change and re-publish the form. 

On my test form I selected a value and saved the form.  Then I updated the table in my database to change the list.  The value I had selected before was no longer included.  When I re-opened my form the value I had previously selected was no longer visible.  Why did this happen?

Environment

Harvest Software Change Manager v12.x and higher

Resolution

This feature of Harvest is working as designed.  If the value previously selected on a form is no longer included in the drop down list it is an invalid value.  

One workaround is to include an additional “read-only” field on the custom form to hold the selected value from the drop down list box.  This way, if the list changes, the value previously selected would still be visible.  You could populate the read-only field with java script using a “field event script" (when a change happens in a field on your form, javascript can be executed to change another field accordingly). 

Additional Information

You can read more about creating and publishing custom form types in the documentation: Create and Modify Form Types