NetTalk Central

Author Topic: Save form as user selects tabs?  (Read 261 times)

jking

  • Sr. Member
  • ****
  • Posts: 400
    • View Profile
    • Email
Save form as user selects tabs?
« on: March 04, 2024, 06:04:50 PM »
Hello everyone,

     I have a complex form with multiple tabs and many fields on each tab. Using NT 14.13.

     A user has requested that the form save "partial" results to the file as they select the many tabs.  Then, when done, they will select the Save button for a final save to disk.  I created a local routine that I try calling from the Tab Changed embed:

SaveTabContents     ROUTINE
 
    Access:CRF001_Surgeon.Open()
    Access:CRF001_Surgeon.UseFile()
    CRF001Sx:Study_ID = p_web.GSV('CRF001Sx:StudyID_key')
   
    Access:CRF001_Surgeon.Fetch(CRF001Sx:StudyID_key)
   
    p_web.SessionQueueToFile(CRF001_Surgeon)
   
    Access:CRF001_Surgeon.TryUpdate()
    Access:CRF001_Surgeon.Close()
   
    EXIT

     So far, this does not update the file.  Maybe a problem with the code in the routine or I'm using the wrong embed to call this?  Any thoughts?

Thanks,

Jeff King

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11182
    • View Profile
Re: Save form as user selects tabs?
« Reply #1 on: March 04, 2024, 09:29:37 PM »
perhaps make a small example app with your code, to show where you are calling it from etc.

Also, since you are loading the record, I presume your form is in "Change" mode, not "Insert" mode?

Incidentally I _suspect_ that given the new Partial Save functionality, and given that you can turn on validation at the tab level, this could likely be reduced, and even made to work with Insert's. Make an example and I'll play with it and see.

Cheers
Bruce

jking

  • Sr. Member
  • ****
  • Posts: 400
    • View Profile
    • Email
Re: Save form as user selects tabs?
« Reply #2 on: March 05, 2024, 06:54:47 AM »
Bruce,

    Thanks!  I found the mention of the new "partial save" button in the release docs of 14.17.  I'll update and try that.  Sounds like exactly what I need.

Jeff