Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

validations on fields

Former Member
0 Likes
506

What is the Process to validate input fields in module programs?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
488

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

3 REPLIES 3
Read only

Former Member
0 Likes
489

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

Read only

Former Member
0 Likes
488

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.

Read only

Former Member
0 Likes
488

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