This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
I am using VLWeb and am simply trying to validate blank input into name fields. Ultimately I want to provide context specific validation messages to the web page.
Q1.
I have a reusable part that shows person details onto a webpage. I have existing fields and table I have to use. The validation rules are located on the table definition and not each specific field definition (not sure if that matters). When I use .validate as shown below, the rules on the table are not being checked. I assume they should be checked but the blank entries is being returned as true - ok.
Q2.
Having jumped to the server, I perform an update on the table. When I do, validation errors occur and I can see messages being passed back to the reusable part, where I have also passed back the IO$STS.
"messages":["Family name must not be blank","Given name must not be blank"],"fields":{"IO$STS":{"type":{"t":"A","l":2},"value":"VE"}}
This isn't particularly useful as it does not relate the messages to a specific field. Is there a method of getting hold of the messages and their related fields from(after) the update command? I have looked through Val_Error settings but am not sure how to get at the message generated and the field it relates to?
You will see it will highlight the fields with error in the screen with no additional interaction needed.
The Alert I put at the end is in the case the server module have additional validation (for example in
a begincheck/endcheck or particular stuff or other kind of errors like duplicated key)