At 11:25 PM 4/7/2010, Doug Hamilton wrote:
The question is, where does the above code belong?
* Before the EDIT USING command?
* OnBeforeStart EEP in the form CustControlPlans?
* OnAfterStart EEP in form CustControlPlans?
I've tried them all and nothing seems to work.
Should I be using a different property command?
A side question is: For how long is the 'READ ONLY' property valid?
* Till the form closes?
* Till the db is disconnected?
* Till the R:Base session is closed?
Doug,
Keeping everything in perspective, including your logic of identifying
users, etc., try the following PROPERTY commands as "On After Start" EEP.
-- On After Start EEP
PROPERTY RBASE_FORM DONTSHOWSAVEDIALOG 'TRUE'
PROPERTY RBASE_FORM DONTSHOWDELETEDIALOG 'TRUE'
PROPERTY TABLE formtablename 'READONLY TRUE'
RETURN
To understand the exact logic, try the "Customers" form used in RRBYW14
(7.6), RRBYW15 (Turbo V-8), or RRBYW16 (R:BASE eXtreme 9.0 - 32/64).
Steps:
01. EDIT USING Customers
Try to edit customer name, address or phone number, etc.
Notice that you are able to change/edit anything you wish.
02. Now open the same form in form designer and use the following
code as "On After Start" EEP.
-- On After Start EEP
PROPERTY RBASE_FORM DONTSHOWSAVEDIALOG 'TRUE'
PROPERTY RBASE_FORM DONTSHOWDELETEDIALOG 'TRUE'
PROPERTY TABLE Customer 'READONLY TRUE'
RETURN
03. Save the form
04. Repeat Step 01
This time you will NOT be able to change/edit anything.
You may further customize the code based on network user, etc.,
Example:
-- On After Start EEP
PROPERTY RBASE_FORM DONTSHOWSAVEDIALOG 'TRUE'
PROPERTY RBASE_FORM DONTSHOWDELETEDIALOG 'TRUE'
IF (CVAL('NetUser')) NOT IN (Doug,Razzak,Bill) THEN
PROPERTY TABLE Customer 'READONLY TRUE'
ENDIF
RETURN
That's all there is to it!
Very Best R:egards,
Razzak.
--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================