NetTalk Central

Author Topic: Validation page - Call from and "return" to PostInsert  (Read 3449 times)

CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Validation page - Call from and "return" to PostInsert
« on: February 28, 2011, 12:17:13 PM »
Hi,

I have an unusual validation requirement.   I have a form that uses memory tables both for the parent and for two child browses.  After being saved in memory, the parent and child records are transferred to physical files.  Individually, the child records are not invalid, but they can be invalid in combination.  There can be many child records that are invalid this way.  Further,  the user can choose to accept the invalid combinations anyway.

I would like to present the user with a browse of the invalid child combinations that they can individually mark using the check box EIP.   I am hoping there is a way to call the validation page from the start of PostInsert with the relevant stage and other parameters so that when the user completes the validation browse, the PostInsert stage is executed again but this time skipping the validation page call

If anyone has suggestions on how to do this, or an alternative approach that would give the user the option of accepting or rejecting many invalid entries, it would be greatly appreciated.

Many thanks. 

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Validation page - Call from and "return" to PostInsert
« Reply #1 on: February 28, 2011, 02:25:35 PM »
Hi Casey,

the approach I use is at the validate all routine I loop through the records in the browse and add a visual indicator to any rows that are invalid. In my case they must be fixed. I guess I could do the visual indicator at the time of entry rather than when trying to save the entries.

Your approach with the checkbox I think is the way to go. If you wanted to just list invalid records then maybe you could bring up a new page after saving all valid records?

HTH's

Kev

CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Re: Validation page - Call from and "return" to PostInsert
« Reply #2 on: March 01, 2011, 11:32:59 AM »
Thanks, Kevin

Your reply has given me an idea for dealing with the issue without having to call a separate browse page.  I will post how it works out.  Much appreciated.

CaseyR

  • Sr. Member
  • ****
  • Posts: 448
    • View Profile
    • Email
Re: Validation page - Call from and "return" to PostInsert
« Reply #3 on: March 15, 2011, 06:11:16 PM »
For the sake of anyone else who has to present the user with a list of invalid entries for acceptance or rejection, here is how I resolved this issue.

As mentioned earlier, all parent and child record changes are first saved in In-Memory tables and only transferred to physical files at the end.

I created a conditional tab to hold a browse of a memory table that lists the invalids to be presented to the user.  At the end normal validation process, a procedure is called that loads any invalids that are to be presented to the user for acceptance/rejection.  The tab display condition is set to True, and the tab is identified as the loc:InvalidTab, so the browse with the invalids and check box EIP's is presented to the user.   The user checks the invalids he wants to accept and clicks the Save, which skips the load procedure this time.

In Post Insert, all the proposed child records that have not been accepted are weeded out of the memory tables and the memory tables are transferred to the physical files.