There are two basic methods for populating a picklist from a database. Using the Mi-Forms Designer’s built-in ODBC picklist available in the Picklist Properties dialog or writing script code.
Using built-in ODBC:
- Create a picklist on your form
- In the Picklist Properties dialog, select the Datapath tab.
- Under Type, select ODBC.
- If the connection to the database will be made from a Mi-Forms Server, change the scope to Server, otherwise leave as Client.
- Enter the ODBC data source name. This is the DSN created on the user’s system, or on the Mi-Forms Server.
- Enter the table name containing the data you wish to access.
- Username and password are not normally required as they are stored in the DSN. If you have problems connecting, you may want to enter the username and password here.
- Enter Filter information if desired.
- Enter Order By information if desired.
- Switch to the DataMap tab.
- The first field under Mi-Forms Field should be the picklist field name.
- The first field under Source Field should be the the column name from the database table you entered in Step 6. This is where the data is being pulled from to populate the picklist.
- Complete any additional rows in the Data Map to populate other fields in your form based on the picklist selection.