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