How You Can Create the Fields
To create each field, use the Create method to create the specific field object and then set its required attributes. The attributes that you set depend on the type of field you are constructing. In addition, if you want the field to have a title on the form, you must construct the field trim as well.
If your fields correspond to columns in a database table, as do the fields in the example application, retrieve the column name, length, and data type information from the database to create the fields. You can retrieve this information in any of the following ways:
• A select loop
• An SQLSelect object
• A QueryObject object
The DynamicFrame frame uses a select loop to retrieve information for building the columns. For an example of using a select loop to create fields dynamically, see
How You Can Construct the Fields (see
How You Can Construct the Fields). For an example of using a query object to retrieve this information, see
Creating Dynamic Frames (see
Creating Dynamic Frames).