NetTalk Central

Author Topic: Button on Browse row  (Read 5430 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Button on Browse row
« on: March 18, 2009, 04:28:17 AM »
Hi,
I have a browse with an "other" button in the row to call another form (from another file)

Action: Other
URL: 'uPatient?<!-- Net:s:SID--> &DAT__ID='&APP:ID_DAT&'&Change_btn=Change&'
Target: 'right_fram'

The problem is that when I press Save or Cancel in the form it returns to the main frame! repeating all the web page with all the frames in the right frame.

What to do for the form to return to the calling browse?

Thanks
Alberto

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

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Button on Browse row
« Reply #1 on: March 18, 2009, 05:06:40 AM »
Alberto,

In the Form tab of the browse definition, where you define which buttont are over and under the browse, do you have an URL filled in with the cancel and/or close option?
Maybe you shouldn't.
In my case the result is that te page goes straight to the page "where it coms from". (Not really. The web only goes forward of course).

Rene
Rene Simons
NT14.14

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Button on Browse row
« Reply #2 on: March 18, 2009, 05:25:20 AM »
May be I was not clear...

The Browse is from table A, it has a Form that updates the table A but...
the button calls a form of the table B

There are 3 browses that calls the same table B form by a button

I even call the form with a button in another forms.

Any idea?
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Button on Browse row
« Reply #3 on: March 18, 2009, 07:15:03 AM »
Hi Alberto,

Read carefully what Rene is saying.

Check the _Form_ procedure, the "Url on Save" and "Url on Cancel" settings.
If you've set these then this will override the place the default form goes back to.

Cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Button on Browse row
« Reply #4 on: March 18, 2009, 07:22:13 AM »
OK, because the form can be callet from some browses or forms I need to use a veriabel like:

URL:   p_web.gsv('UrlToReturnTo')

Where in a browse button or in a form button add the   p_web.ssv(...)  ?

Thanks
Alberto

PD:Rene was talking about the form tab in the browse termplate.
-----------
Regards
Alberto

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Button on Browse row
« Reply #5 on: March 18, 2009, 11:12:06 AM »
Alberto,

Why don't you just try it. Maybe it'll just work the way you want it.
The "back"-routing of the form is "defined" in the Form_procedure.

Rene
Rene Simons
NT14.14

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Button on Browse row
« Reply #6 on: March 18, 2009, 11:24:05 AM »
Rene,

I´ve tried it!. Sory if I boder you!

I always try before post.

What I dont know is:
Where in a browse button or in a form button add the   p_web.ssv(...)  ?

THanks a lot
Alberto

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

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Button on Browse row
« Reply #7 on: March 18, 2009, 03:06:51 PM »
I usually set in the pre-insert and pre-update embeds on forms. I always embed browses in forms as it gives you much more options to add additional buttons etc. But on a browse you could just set it at proc

  ! Start of "After Setting Browse Behavior Settings"
  ! [Priority 5000]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Button on Browse row
« Reply #8 on: March 18, 2009, 11:23:12 PM »
You can set it in the GenerateBrowse routine - but this is a dangerous thing to do.

Perhaps you should pass the "go back to" URL as a parameter on the browse button, and then in the Form do a STOREVALUE to copy the parameter into the session queue.

Cheers
Bruce