cancel
Showing results for 
Search instead for 
Did you mean: 

Where to validate user input from FPM_FORM_UIBB?

mike_mcinerney
Participant
0 Kudos

I am supporting an ESS OVP app using WDA and FPM. 

This question concerns validating/changing user input from an edit page entered through FPM_FORM_UIBB

In a form, on an edit page, we wanted to mask the initially loaded value of a field with asterisks.

I used the feeder class get_data() method to accomplish this.

The user may then overtype the asterisks with content data.  At times, the user leaves some of the asterisks there as well.

I want to check the contents of the inpu field, and, if needed, compress out the asterisks.

if not inputfield co '* ' .
translate inputfield using '* ' .
condense inputfield NO-GAPS .
endif .
 

Where can I put this code? Or, where, generally, do you code validations of form data?

Thanks…  

…Mike

Accepted Solutions (1)

Accepted Solutions (1)

former_member193369
Active Participant
0 Kudos

Hello Mike,

you should receive the changed data in the feeder's FLUSH method, and check and validate it in PROCESS_EVENT. If the user has to adjust the value manually the event loop should be cancelled in PROCESS_EVENT else (if the data can be adjusted automatically) you should return the corrected value in GET_DATA.

Best regards,

   Christian

Answers (1)

Answers (1)

laeeqsiddique
Participant
0 Kudos

Hi Mark,

You should be able to catch the event in PROCESS_EVENT and GET_DATA. I would put the break-point in both of these methods and check for the field values and based on that decide course of action. So steps would be.

1) Put in the break-points in the obove methods.

2) Check the event and the field values you are intrested in.

3) Code accordingly.

Hope it helps.

Laeeq Siddique