NetTalk Central

Author Topic: Optionally ask for input before proceeding to the view/change form  (Read 3770 times)

sorev@accesscomm.ca

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
When a user wishes to view or change a record with a certain criteria (eg. FIL:Level>5000 AND GLO:AskIfAccessed=True), I want to ask them the reason they are accessing it (before they access it), and store the result in an audit log. I think that the form to form example is similar to what I want, but the first form should always be an insert (into the audit log file) or skipped, while the second form (the main record) should be a change or view.

What is the easiest way to do this?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Optionally ask for input before proceeding to the view/change form
« Reply #1 on: October 24, 2007, 04:34:35 AM »
good question - but alas I don't have an exact answer for you as I've not tried this myself.

Basically you'd need to capture the "starting" parameters, and then push these on to the second form. It's kinda hard to explain.

I think the problem breaks down into a couple of parts.
a) the "change" button needs to be "inline" in the browse. This way you can have different URL's for different change buttons. You'd calculate the URL (based on the criteria) as the _browse_ generates.

b) in the "first form" you'd store the incoming row ID, and also configure the form so it's in "Insert" mode. Or make it a memory form and do the Insert "manually" in the ValidateRecord embed point.

c) The "save" URL would be set to call the real form, see FAQ #4 for help on getting this URL right.

Good luck.

Cheers
Bruce

sorev@accesscomm.ca

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Optionally ask for input before proceeding to the view/change form
« Reply #2 on: October 24, 2007, 07:06:55 AM »
Thanks!