NetTalk Central

Author Topic: Form in change mode without using url  (Read 4075 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Form in change mode without using url
« on: April 22, 2009, 06:31:09 AM »
hi,
I have a form that always updates the same record,
I know th ID to fetchit and I know I want to change it.
How to go to the Form page wihtout having to add the ID and Change_btn in the url?
I´ve tried with

  p_web.SetSessionValue('vcu_CurrentAction',ChangeRecord)
  loc:action = p_web.site.ChangePromptText
  loc:act = ChangeRecord

in the Procedure Setup, in the Generate Form but it does not work.

I always get a record not forund(5) Error 0: from key ....

Thanks
Alberto

-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Form in change mode without using url
« Reply #1 on: April 23, 2009, 02:09:03 AM »
Hi Alberto,

This is one of those cases where the complexity of the underlying code rears it's head. Remember the server, and browser are "mimicking" a "program" but it's fundamentally doing something the browser was not meant to do.

Answering your question is somewhat complex, so instead I've added a setting for build PR35.
On the form, advanced tab, you can now set the "default form action" and the value of the unique key field if the action is "change".

I'm hoping to upload PR 35 later today.

Cheers
Bruce


Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Form in change mode without using url
« Reply #2 on: April 24, 2009, 03:26:05 PM »
Hi Bruce,

And thank you very much but... how dos it works?Hace I to fetch the record before calling the form?, must I set some SSV before?
Thanks
Alberto
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Form in change mode without using url
« Reply #3 on: April 24, 2009, 03:38:12 PM »
Hi,
I add in the Procedure Setup:

   USU:ID = p_web.gsv('login_id')
   Access:Users.Fetch(USU:xID_USU)
   p_web.ssv('USU:ID',USU:ID)

But it does not work.
Any Idea?

Thanks
Alberto
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Form in change mode without using url
« Reply #4 on: April 24, 2009, 11:03:54 PM »
Hi Alberto,

On the form, advanced tab, you can now set the "default form action" and the value of the unique key field if the action is "change".

you should probably remove any hand-code you've got that might be interfering.

Cheers
Bruce