NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: walter.dasilva on June 25, 2013, 10:29:50 AM

Title: Conditional INSERT button
Post by: walter.dasilva on June 25, 2013, 10:29:50 AM
Hi,

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

Thanks
Title: Re: Conditional INSERT button
Post by: Rene Simons 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
Title: Re: Conditional INSERT button
Post by: Bruce 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

Title: Re: Conditional INSERT button
Post by: Rene Simons on June 26, 2013, 01:12:15 AM
We never stop learning!
Title: Re: Conditional INSERT button
Post by: walter.dasilva on June 26, 2013, 04:06:50 AM
That´s great,

Thank you all.