NetTalk Central

Author Topic: Conditional INSERT button  (Read 3330 times)

walter.dasilva

  • Sr. Member
  • ****
  • Posts: 314
  • SOFTVALE
    • MSN Messenger - walter@softvale.com.br
    • View Profile
    • SOFTVALE
Conditional INSERT button
« on: June 25, 2013, 10:29:50 AM »
Hi,

How to hide INSERT button if form was called as popup?

Thanks
Walter - SOFTVALE

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Conditional INSERT button
« Reply #1 on: June 25, 2013, 10:07:11 PM »
Hi Walter,

I suppose that the popup call is made from a specific procedure. I.e. Not the browse which normally calls the insert, update delete or view?
In that case you can put a test for the parent procedure on the insert button.

E.g.:        loc:parent <> 'caller'

Where caller is the specific procedure that makes the popup call.
Make sure that the procedure name is all lower case or else your test won't work.

Regards,
Rene Simons
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Conditional INSERT button
« Reply #2 on: June 25, 2013, 10:18:30 PM »
Hi Walter,

Rene points out a good tip - you can use loc:parent to determine where the procedure came from, and that's really useful for conditional behavior.

but to answer your specific question - you know if the procedure is in popup mode if loc:popup = 1.

so, if you set the Insert button condition to

Loc:Insert = 0

update : sorry I mistyped... should be

 Loc:Popup = 0

That'll hide the insert button in popup mode.

cheers
Bruce

« Last Edit: June 26, 2013, 01:46:24 AM by Bruce »

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: Conditional INSERT button
« Reply #3 on: June 26, 2013, 01:12:15 AM »
We never stop learning!
Rene Simons
NT14.14

walter.dasilva

  • Sr. Member
  • ****
  • Posts: 314
  • SOFTVALE
    • MSN Messenger - walter@softvale.com.br
    • View Profile
    • SOFTVALE
Re: Conditional INSERT button
« Reply #4 on: June 26, 2013, 04:06:50 AM »
That´s great,

Thank you all.
Walter - SOFTVALE