Using the New Data Maintenance Wizard
Use the New Data Maintenance Wizard to quickly create a new table, IDO, and form, all from a single procedure. This wizard is especially helpful when you want to create a new form, instead of building on top of an existing database schema.
To create a table, IDO, and form with the New Data Maintenance Wizard:
- Go into Design Mode.
- On the Design Mode toolbar, click the New Data Maintenance Wizard button.
- In the Name field, specify the name that is to be assigned to the new table, IDO, and (optionally) form.
- Specify the
IDO Project to which the
new table, IDO, and form are to belong.
If the IDO project you want does not yet exist, you can click the ellipsis (...) button next to this field and use the Add IDO Project dialog box to create a new one.
- Specify the Form Type that the new form is to be.
- Optionally, if you are creating a MultiView form, specify a default Form Layout for the Grid View.
- Optionally, specify the Device Type that the new form is to be created for.
- Optionally, specify your own
Table Alias for the table
to be created.
If you do not specify a table alias, the wizard specifies a default alias. We recommend the use of a short mnemonic alias.
- Optionally, to designate the table, IDO, and form as part of a
multi-site setup, select the
Site Split check box.
When selected, the Table Name and View Name fields are automatically populated with appropriate names, which you can modify.
- Optionally, to have the wizard create only the table and IDO, but not the form, clear the Create Form check box.
- Optionally, to have the wizard create an IDO description, a form description, a form caption, and/or sort columns alphabetically, click the Options button on the NDMW toolbar, and use the New Data Maintenance Wizard Options dialog box.
- Define the table columns/IDO properties/form components that the
wizard is to create. Add a row to the grid for each column/property/form
component.
The grid includes these attributes for each column/property/form:
Grid column/Attribute Specification/Comments Name Required. Specify a name for the new column/property/form component. Note: You cannot use spaces or special characters in the name.Property Class Optional. Specify the property class on which you want to base the column/property attributes. If you select a property class, several other column fields are populated automatically.
If the property class you want does not yet exist, you can click the Add option and use the Add Property Class dialog box to create it.
Data Type Required. Specify the Mongoose data type for the IDO property. Assuming you specify this setting before the SQL Data Type, the wizard automatically selects an appropriate data type for the SQL Data Type setting, which you can then override if you want.
SQL Data Type Required. Specify the SQL data type for each record in this column of the table. You can specify an existing SQL base data type or a User-Defined Data Type (UDT). To create and specify a UDT, click the Add option and use the Add User Defined Type dialog box.
Property Length Optional, depending on the data type. Certain data types allow a length to be set. This specification determines the maximum length that the component's value can have. In the case of string types, it sets the maximum number of characters that can be used. In the case of number types, it sets the maximum total number of digits the number can have to the left or right of any decimal point.
Decimal Precision Optional. Certain data types allow you to specify how many decimal places should display to the right of the decimal point. To specify that scale, specify a number in this field.
Primary Key To make the column/property a primary key, select this check box. Required If the column/property value is required, that is, it cannot be null, select this check box. If the property is to allow null, clear this check box. Label String ID Optional. Specify a translatable string to use for the form component's caption. If you specify a string that does not already exist, WinStudio asks whether you want to create one. If you say no, WinStudio treats this value as a literal string.
To create a new translatable string, you can click the Add option and then use the String Properties dialog box to create it.
Default Value Optional. If the form component is to display a default value, specify that default value here. You can use keywords, such as the AUTONUMBER(). Note: This setting refers to the IDO default value and not a SQL default value. - To add more columns/properties/components, use the Add Row button on the NDMW toolbar.
- Optionally, use the move buttons on the right to rearrange the order of your columns/properties/components.
- Optionally, to include a subcollection as part of the form, click
the Add Collection button on the NDMW toolbar.
This action creates a new "page" on which you can define the subcollection. Most of the fields and options on this page are the same as for the primary collection. An additional optional field allows you to assign a Subcollection Name that is different from the basic collection Name.
For additional steps that are required if you specify a subcollection, see Adding a Subcollection in the New Data Maintenance Wizard.
- When you are finished defining the columns/properties/form
components for the primary collection and any subcollections, click Next.
The wizard displays the Finish page.
- Optionally, to save the form definition as the new form is created, select the Save Form Definition Template option.
- Optionally, to have the generated scripts saved to a text file (with a .sql extension, that SQL can use), click Save Script .
- Optionally, to save the generated scripts to the Windows system Clipboard, click Copy to Clipboard .
- To finalize the process, create the table, IDO properties, and optionally the form, click Finish .
WinStudio then processes the specifications and creates the SQL table, IDO properties, and (optionally) form.