NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Robert Iliuta on November 24, 2011, 02:03:42 AM

Title: How can I detect form is in View mode?
Post by: Robert Iliuta on November 24, 2011, 02:03:42 AM
Hallo,

I need to write some code when the form is in view mode.
I know how to detect insert,change,delete,copy but view ....

I put some trace (loc:act and loc:action) in Set Action embed and I got 6 entries:
change
view
view
change
view
change

In generate form the loc:act and loc:action always return 2 and Change (for view mode)
:-) the form open in view mode after all,...

What code and embed to write to detect view mode?

Thank you for any suggestion,
Robert

Title: Re: How can I detect form is in View mode?
Post by: Rene Simons on November 24, 2011, 03:43:33 AM
Hi Robert,

In my update forms, I use a source function to return a description which is shown on the tab.
Like e.g. 'Insert record',  'Edit record'  etc..
I put the function name in the tab heading. The argument I put in the function call is loc:act.

Because when the app is running, the tab allways shows me the right "file action" (as I call it), I presume the place where the function is executed, is the right place to look for  the value of loc:act.

Name your tab 'Humpty dumpty' and check the source for this "frase".
When you find it you have also found the place to check out the true value of loc:act you need.

Cheers,
Rene
Title: Re: How can I detect form is in View mode?
Post by: Bruce on November 24, 2011, 07:19:10 AM
loc:viewonly = true

cheers
Bruce
Title: Re: How can I detect form is in View mode?
Post by: Rene Simons on November 24, 2011, 07:38:05 AM
 :)
Title: Re: How can I detect form is in View mode?
Post by: Robert Iliuta on November 24, 2011, 09:01:57 AM
Thank you Bruce & Rene!
Solved. ;)
Robert