CodeCharge Studio
ReadAllowed Run-Time Property (ASP)
Applies to
EditableGrid Form,
Record Form
Type
Boolean
Access
read/write
Syntax
object.ReadAllowed [=value]
Description
This property contains a Boolean flag that if set to true, prevents displaying
record's data. If the property is set to true, the form is working in insert mode regardless
of the passed parameters.
This property may be used to prevent users from viewing particular records.
Personal entries can be protected using custom code that resets this property.
The property's value has to be set in the form's Before
Select event or earlier.
Examples
The following example allows users to browse only their own records.
The example assumes DiaryEntry form exists and there is author_id
hidden field to keep record's author identifier. This code may be inserted into
Before Select event or earlier (form's
Before Show is called after property
checking).
If DiaryEntry.author_id.Value = CCGetUserID() Then
DiaryEntry.ReadAllowed = True
Else
DiaryEntry.ReadAllowed = False
End If
See also
Before Select event
UpdateAllowed property
DeleteAllowed property
InsertAllowed property
On-line, printable versions and updates