2008 Jan 12 9:50 AM
What is the Process to validate input fields in module programs?
2008 Jan 12 10:19 AM
Hi,
Use chain and end chain statement
i use the CHAIN statement in my PAI for checking whether the input of a user is valid.
Here an example:
codePROCESS AFTER INPUT.
MODULE leave_programm AT-EXIT COMMAND.
CHAIN.
FIELD: field1,
field2,
field3
MODULE check_input.
ENDCHAIN.
MODULE user_command_0100.
[/code]
The Module check_input checks whether the user input in field 1 to 3 is valid (e.g. for a search of something). If the input isn't valid, i throw an error Message within check_input and the fields between CHAIN and ENDCHAIN on actual SCREEN accept a new user input, while other Fields on SCREEN doesn't accept input.
If everything's fine the program can move on with user_command_0100 and searching or whatever.
Reward if useful.
Regards
Hi Mukesh,
In PAI (Write field statement on field you want to validate, if you want to validate group of fields put in chain and End chain statement.)
Regards,
Chandru
2008 Jan 12 10:19 AM
Hi,
Use chain and end chain statement
i use the CHAIN statement in my PAI for checking whether the input of a user is valid.
Here an example:
codePROCESS AFTER INPUT.
MODULE leave_programm AT-EXIT COMMAND.
CHAIN.
FIELD: field1,
field2,
field3
MODULE check_input.
ENDCHAIN.
MODULE user_command_0100.
[/code]
The Module check_input checks whether the user input in field 1 to 3 is valid (e.g. for a search of something). If the input isn't valid, i throw an error Message within check_input and the fields between CHAIN and ENDCHAIN on actual SCREEN accept a new user input, while other Fields on SCREEN doesn't accept input.
If everything's fine the program can move on with user_command_0100 and searching or whatever.
Reward if useful.
Regards
2008 Jan 12 6:10 PM
In module pool programming we can validate a particular field in the process after input event i.e. PAI.
We can use the field command to validate a single field or a CHAIN ENDCHAIN command to validate a group of fields.
2008 Jan 13 4:32 AM
Hi Mukesh,
In PAI (Write field statement on field you want to validate, if you want to validate group of fields put in chain and End chain statement.)
Regards,
Chandru
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |