How Do I ... : Work with complex parts : Test using the Form Input Checker : Example: Check social security entries
Example: Check social security entries
Test using the Form Input CheckerTest using the Form Input CheckerNo tip for this topicNo example for this topicMake reusable formsMake reusable forms
Suppose you have an application like the following:
Data application window
This application has a window as its parent part. And it has the following child parts:
An Add Data push button
A text entry field that uses the Social Security Number data type
To use the Form Input Checker to validate the data type of the text entry field:
1. Place a Form Input Checker part formchek on the free-form surface. The part is in the Data Entry category.
2. Click mouse button 2 (or 3) on the Form Input Checker part to pop up its menu.
3. Select Connect > verificationRoot from the pop-up menu. The mouse cursor changes to spider
4. Click on the window.
5. From the displayed pop-up menu, select All Features.
6. From the displayed window, select the attribute self and then OK.
Now, complete steps similar to steps 2 through 6 to make three more connections:
Connect the clicked event of the push button to the check action of the Form Input Checker.
Connect the checkFailed event of the Form Input Checkerto its showErrorToUser action. (This connection appears as a green, triangle-shaped arrow on the Form Input Checker part.)
Connect the checkSucceeded event of the Form Input Checker to the closeWidget action of the window.
Finally, run the application. If you enter nine digits in the text pane and click on Add Data, the window closes. If you enter invalid data for the Social Security Number type--such as letters--and click on Add Data, a message box saying "Invalid Social Security Number" is displayed.
Last modified date: 08/14/2019