ViewDef |
|
ViewDef is a subordinate object used to define a basic view definition. It creates a group of CalcItem objects to manage information concerning calculated items that have been defined for the view, as well as a group of ViewItem objects to manage information concerning items selected for the view. A ViewDef object corresponds to a record in the pvxview.src file.
For information on the pvxview.src file structure, see Views System File Structures.
The following table lists the properties of the ViewDef subordinate object:
Property |
Description | ||||||
CloseLogic$ |
Logic to be executed when a view is closed using the 'Close() method. See Logic Procedures. | ||||||
CloseLogicType$ |
Same as for InitLogicType$. | ||||||
Description$ |
Short description used to identify the view. | ||||||
Filter$ |
Free-form data filter. | ||||||
InitLogic$ |
Logic to be executed when a view is opened using the 'Open() method. Reference based on InitLogicType$. | ||||||
InitLogicType$ |
Single character string indicating logic type:
| ||||||
InternalID$ |
Internal identifier for the view. | ||||||
Key$ |
Sort key for reading the primary data source. | ||||||
Locked |
Indicates that the view definition cannot be modified unless unlocked with password.
| ||||||
LogicObject$ |
Object specified to supply logic references. See Logic Procedures. | ||||||
LongDescription$ |
Long description for storing notes about the view. | ||||||
Order$ |
Element order:
| ||||||
OriginalDescription$ |
(Internal Use Only) Original description of the view when loaded. | ||||||
Password$ |
Encrypted password for locking view definition. | ||||||
PrimarySource |
DataSource object identifier for primary data source. | ||||||
UpdateStamp$ |
Last update. |
The following table lists the methods of the ViewDef subordinate object:
Method |
Description | ||||||||||||||||||||||||||||||||||||||||||||||||
AddCalcItem( ) |
Add a new CalcItem object to the view. (AddCalcItem method was added in PxPlus 2021.) | ||||||||||||||||||||||||||||||||||||||||||||||||
AddItem(ItemPath$) |
(Internal Use Only) Add a new ViewItem object to the view based on the item path. The sequence of the ViewItem objects will be adjusted automatically to ensure they are grouped by their linkage path. Use ViewCtl equivalent. | ||||||||||||||||||||||||||||||||||||||||||||||||
AdjustItemSequence( ) |
Adjust the sequence of the ViewItem objects based on their linkage path. | ||||||||||||||||||||||||||||||||||||||||||||||||
Clear( ) |
Re-initialize the view definition and delete all CalcItem and ViewItem objects created by it. | ||||||||||||||||||||||||||||||||||||||||||||||||
ClearCalcItems( ) |
Delete all CalcItem objects belonging to the view. (ClearCalcItems method was added in PxPlus 2021.) | ||||||||||||||||||||||||||||||||||||||||||||||||
ClearItems( ) |
Delete all ViewItem objects belonging to the view. | ||||||||||||||||||||||||||||||||||||||||||||||||
GetCalcItem(ItemPath$ | Column$ | idx) |
Return the object identifier for the specified CalcItem. (No trailing "$" when specifying a column.) (GetCalcItem method was added in PxPlus 2021.) | ||||||||||||||||||||||||||||||||||||||||||||||||
GetCalcItemCount( ) |
Return the number of CalcItem entries. (GetCalcItemCount method was added in PxPlus 2021.) | ||||||||||||||||||||||||||||||||||||||||||||||||
GetCalcItemIndex(ItemPath$ | Column$) |
Return the specified CalcItem group index. (No trailing "$" when specifying a column.) (GetCalcItemIndex method was added in PxPlus 2021.) | ||||||||||||||||||||||||||||||||||||||||||||||||
GetItem(ItemPath$ | Column$ | idx) |
Return the object identifier for the specified ViewItem. (No trailing "$" when specifying a column.) | ||||||||||||||||||||||||||||||||||||||||||||||||
GetItemCount( ) |
Return the number of ViewItem entries. | ||||||||||||||||||||||||||||||||||||||||||||||||
GetItemIndex(ItemPath$ | Column$) |
Return the specified ViewItem group index. (No trailing "$" when specifying a column.) | ||||||||||||||||||||||||||||||||||||||||||||||||
LoadPassword(Password$) |
(Internal Use Only) Load an encrypted password. View must be unlocked with no current password. | ||||||||||||||||||||||||||||||||||||||||||||||||
RemoveCalcItem(ItemPath$ | idx) |
Remove a calculated item from the view. (RemoveCalcItem method was added in PxPlus 2021.) | ||||||||||||||||||||||||||||||||||||||||||||||||
RemoveItem(ItemPath$ | idx) |
(Internal Use Only) Remove an item from the view. Use ViewCtl equivalent. | ||||||||||||||||||||||||||||||||||||||||||||||||
SetCondition(ItmPath$, Code, Case[, v1$ v8$]) |
Set a filter condition at the view item level.
v1$...v8$ - Values to be used in comparison. Pass numeric values as string arguments. Note:
| ||||||||||||||||||||||||||||||||||||||||||||||||
SetCloseLogic(Type$,Logic$) |
Set CloseLogic$. | ||||||||||||||||||||||||||||||||||||||||||||||||
SetDescription(Description$) |
(Internal Use Only) Set the description of the view. Use ViewCtl equivalent. | ||||||||||||||||||||||||||||||||||||||||||||||||
SetFilter(Condition$) |
(Internal Use Only) Set the filter to be applied at the view level.
Note:
| ||||||||||||||||||||||||||||||||||||||||||||||||
SetInitLogic(SrcObjID, Type$, Logic$) |
Set initialization logic for a ViewDef or DataSource object. | ||||||||||||||||||||||||||||||||||||||||||||||||
SetInitLogic(Type$, Logic$) |
Set InitLogic$. | ||||||||||||||||||||||||||||||||||||||||||||||||
SetInternalID(InternalID$) |
(Internal Use Only) Set the internal identifier for the view. | ||||||||||||||||||||||||||||||||||||||||||||||||
SetKey(Key$) |
Set the sort key for reading the primary data source. | ||||||||||||||||||||||||||||||||||||||||||||||||
SetLogicObject(ObjNm$) |
Set LogicObject$. | ||||||||||||||||||||||||||||||||||||||||||||||||
SetLongDescription(LongDescription$) |
Set the long description for storing notes about the view. | ||||||||||||||||||||||||||||||||||||||||||||||||
SetOrder(Order$) |
Set the element order:
| ||||||||||||||||||||||||||||||||||||||||||||||||
SetOriginalDescription$(Description$) |
(Internal Use Only) Set the original description when view is loaded. | ||||||||||||||||||||||||||||||||||||||||||||||||
SetPassword(Password$) |
Put a password on an unlocked view definition. Remove the password by passing a null password. | ||||||||||||||||||||||||||||||||||||||||||||||||
SetPrimarySource(ObjID) |
(Internal Use Only) Set the object identifier of the primary DataSource object. | ||||||||||||||||||||||||||||||||||||||||||||||||
SetUpdateStamp(Stamp$) |
(Internal Use Only) Set the date/time stamp for the last update. | ||||||||||||||||||||||||||||||||||||||||||||||||
Unlock(Password$) |
Unlock a passworded view definition for update, but do not remove the password. |
ItmPath$ - [Link ObjID [+ Link ObjID …]] + DS_Item ObjID
The path begins just below the primary data source, resulting in the path for items from the primary data source consisting of the DS_ItemObjID alone.