NetTalk Central

Author Topic: How can I detect form is in View mode?  (Read 3354 times)

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
How can I detect form is in View mode?
« 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


Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: How can I detect form is in View mode?
« Reply #1 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
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: How can I detect form is in View mode?
« Reply #2 on: November 24, 2011, 07:19:10 AM »
loc:viewonly = true

cheers
Bruce

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: How can I detect form is in View mode?
« Reply #3 on: November 24, 2011, 07:38:05 AM »
 :)
Rene Simons
NT14.14

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: How can I detect form is in View mode?
« Reply #4 on: November 24, 2011, 09:01:57 AM »
Thank you Bruce & Rene!
Solved. ;)
Robert