Home Forum Download/Upload Links Search

NetTalk User Group

NetTalk User Group Meeting!
Live Webinar!
Saturday Nov. 16 
7am PST
Click Here To Register!
NetTalk Central
August 01, 2014, 07:53:33 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the NetTalk Central Forums!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Setting Form to view only  (Read 1108 times)
John Hickey
Administrator
Newbie
*****
Posts: 47



View Profile Email
« on: June 17, 2007, 02:27:50 PM »

On the Newsgroups, Gregg Matteson asked:

How do you set a form to view only , only while the form is in change mode?

I tried setting a session variable at the browse then using that value in a local variable in the form but no luck so far.

Bruce Johnson Answered:

on the advanced tab is
"View Only IF:"
field.

In this you can put any expression.

In your case the expression would be

p_web.GetSessionValue('UpdateInvoices_CurrentAction') = ChangeRecord
where "UpdateInvoices" is the name of this form procedure.

In 4.26 I'll be making it a little easier to test the "current action" as this is something that came up a few times on tour.

Incidentally if your code to determine whether it should be View only or not is too big, then you can set the variable
loc:viewonly in the form in the Generate Form embed point to 1.

Cheers
Bruce
Logged
John Hickey
Administrator
Newbie
*****
Posts: 47



View Profile Email
« Reply #1 on: June 17, 2007, 02:28:56 PM »

Gregg Matteson then replied:


I know about the "view only if" prompt but your suggestion got me headed in the right direction.

in the generate Form | Start

I placed :

if p_web.GetSessionValue('UpdateInvoices_CurrentAction') = ChangeRecord AND Accesslevel = 0
        loc:viewonly = 1
        else
        loc:viewonly = 0
    end

the Accesslevel is assigned in the form setup from a session variable.

The result is users with limited access can enter an order but NOT edit orders.

What ever the client wants ;>)
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Login Form

Welcome Guest.






Lost Password?
No account yet? Register
home contact search contact search