SBM ModScript Reference → Programming SBM ModScript → Object Types → Change
(SBM On-Premise/PaaS only)
Each time users modify an SBM table in the system using a browser, it is logged as a Change object in the TS_CHANGES table. This class is mainly used in conjunction with the ChangeList class. Once a change list is found for a table record, the ChangeList is a list of Change objects. This class can be used to access member variables that describe the change. You can read and write with this class by using the inherited AppRecord methods. All of the methods listed on this class directly relate to fields on the Changes table. Please see the SBM schema document for details of each of the fields.
AppRecord -> Change
int Action() – Numeric code classifying the type of change, as listed in the Action Codes table.
Code |
Description |
---|---|
0 |
A record was submitted |
1 |
A record was modified |
2 |
A record was deleted |
3 |
An attachment was added |
4 |
An attachment was updated |
5 |
An attachment was deleted |
int FldId() – TS_ID of the field that was modified during this change.
int FldType() – Data type of the field that was modified during this change. ID Types are listed in the following table.
Type |
Description |
---|---|
100 |
Numeric field (integer or floating point) |
101 |
Text field |
103 |
Date/Time field |
104 |
Drop-down Selection field |
105 |
Binary/Trinary field |
106 |
The system-defined State field (a selection field) |
107 |
User field (a selection field) |
108 |
System-defined Project field (a selection field) |
109 |
Calculated Summation fields |
110 |
Multi-Selection field |
111 |
Contact Selection field |
113 |
Incident Selection field |
116 |
Folder link Selection field |
122 |
Relational field |
123 |
Sub-Relational field |
124 |
System field |
125 |
Multi-Relational field |
126 |
Multi-User field |
127 |
Multi-Group field |
int IssueId() – TS_ID of the record that was modified. Use in conjunction with the TableId property to find the record.
string NewChar() – If the modified field's data type was text, this field holds the field's value after the change. Check the Type property to determine whether this property is valid.
int NewInt() – If the modified field's data type was an integer, this field holds the field's value after the change. Check the Type property to determine whether this property is valid.
double NewReal() – If the modified field's data type was a floating point number, this field holds the field's value after the change. Check the Type property to determine whether this property is valid.
string PriorChar() – If the modified field's data type was text, this field holds the field's value before the change. Check the Type property to determine whether this property is valid.
int PriorInt() – If the modified field's data type was an integer, this field holds the field's value before the change. Check the Type property to determine whether this property is valid.
double PriorReal() – If the modified field's data type was a floating point number, this field holds the field's value before the change. Check the Type property to determine whether this property is valid.
int TableId() – Table ID of the record that was modified. Use in conjunction with the IssueId property to find the record.
int64_t Time() – Returns the time that change was made, as the number of seconds since the beginning of Jan. 1, 1970. To get the time as a formatted string, use the GetTime property. To convert it to a Date quantity, use the TimeT class.
int Type() – Identifies the database type of the quantity that changed, according to the data types listed in the following table. If the quantity was an integer, then its old and new values are available in the PriorInt and NewInt properties. If it was a floating point number, then PriorReal and NewReal are valid. If it was text, then PriorChar and NewChar are valid.
ID |
Description |
---|---|
0 |
Modification to an integer |
1 |
Modification to a floating point |
2 |
Modification to a Text field |
int UserId() – TS_ID of the user who made the change. Use the GetUserName method if the name of the user is needed.
Copyright © 2007–2018 Serena Software, Inc., a Micro Focus company. All rights reserved.