In this section: How to: |
When you drag the fields from the data source into the form, deselect the TITLE and USER fields so they do not appear in the form.
By not copying TITLE into the form, you prevent users from typing an arbitrary title in the field. Give them the option to type either Mr., Mrs., or Ms., using a radio button control. This prevents them from typing arbitrary titles.
The task of using radio buttons can be separated into three steps:
When you let go of the mouse button, you see the green handles indicating that the control is selected. If you drew the rectangle large enough, you might see one radio button and the description of this radio button, as shown in the following image. (If you see nothing, just enlarge the size of the control.)
Your radio buttons should look like this (you may need to adjust the size of your control to see all three of them):
You can move your cursor over the radio buttons in the Form Editor to see the tooltip.
Now, when end users select either Mr., Mrs., or Ms. in this form, their choices are saved in the TITLE column of AddFanStack.
If you wish, save your work and deploy and run your application again to see how it looks. Make sure to close the application before continuing the tutorial.
When you created AddFanStack using the Select Segment Fields dialog box (see How to Add Data Source Fields to a Form), you deselected the TITLE and USER fields. Since you deselected these fields, why are they showing up as columns in the data source stack?
These fields are showing up as columns in the data source stack because of the way WebFOCUS Maintain defines data source stacks with the INFER command. When you use a field in the data source to define a column in a data source stack, WebFOCUS Maintain defines columns based on the rest of the fields in that data source. If your data source is hierarchical, the rest of the fields in the segment and the key fields in any parent segment.
WebFOCUS Maintain includes all of these fields in your data source stack so that when you update your data source from the data source stack, it knows the path to these fields.
These columns are called implied columns.
There is one field from the fannames data source that you have not placed on the form: the USER field. The end user will not be entering this field. Instead, it will be generated by the application.
WebFOCUS |