TStruct properties

Quick Guide >>

The properties of a  transaction structure are displayed in the property panel of TStruct Definition Window.

Property Description
TransId(Name) Every Transaction Structure is identified using a TransId or Name. This TransId is always of character datatype and length five. Every TStruct should have a unique TransId.The first character in the TransId should not be a number.
Caption Every Transaction Structure is given a Caption or Transaction Description which will be displayed on the transaction form at run time
SaveControlField SaveControlField is used to save the transactions conditionally.To set the SaveControlField property,

  • Create an inputfield within the relevant DC of the TStruct.This inputfield should contain either ‘T’ or ‘F’ during runtime.The boolean value can be input directly. It can also be generated through an expression or through an SQL statement.
  • Select the above inputfield from the SaveControlField dropdown in the TStruct properties.
  • Save the TStruct.

During runtime, if the inputField value is true(‘T’), the transaction information gets saved into the database, otherwise it is not saved.Scroll down to see an example.

Note : Only the inputfields which have the Save Value property set as True will be saved into the database.

DeleteControlField The DeleteControlField  facilitates conditional deletion of the transaction . To set the DeleteControlField  property,

  • Create an inputfield within the relevant DC of the TStruct.This inputfield should contain either ‘T’ or ‘F’ during runtime.The boolean value could be either input directly  or generated through an expression / SQL statement.
  • Select the above inputfield from the DeleteControlField dropdown in the TStruct properties.
  • Save the TStruct.

During runtime, the DeleteControlField is evaluated. In case it holds a ‘T’, the transaction gets deleted,otherwise it is not. Scroll down to see an example.

Note: Deletion of Master entries that are used in Transactions is not  allowed.

Track Changes Set this property to maintain a history of all the changes made to transactions. The modified field name,modifying person , date and time of modification, value prior to modification and  the new value are recorded when this property is set.These details can be viewed through View History at run time. Read More.
Attachment Set this property to True to allow images or documents to be attached to a transaction. At run time an Attach option automatically appears in the Task drop down that can be used to attach any external document or image to a transaction. Executable files like exe, com, bat cannot be attached.The attachments are stored in the database.Every TStruct that has attachments will have a table named <TStruct name>Attach.For example, if a TStruct is named cntct, its attachment table will be cntctattach.Read More.
ListView Set this property to True to create automatic lists or dynamic reports. On setting the property to True the form will have a button called List View . Click this button at run time  to view the list of  all records. Read More.
Schema Specify the name of the schema to which the TStruct belongs to.
Search Condition Specify the condition based on which the data will be filtered in the Search option at runtime.
Workflow Set this property to True to enable the TStruct for workflow configuration .A work flow is an approval process where the users will approve the transaction in predefined order.
Traceability  If set to True,for every change made,a backup of the TStruct will be stored in the XML format.

SaveControlField Example

Case 1: An Invoice is to be saved only if the invoice amount is less than Rs.1,00,000. In such cases, an inputfield is created with its  Expression property  as IIF(InvoiceAmount < 100000, {T}, {F}) and then the SaveControlField is set to this InputField.

Case 2: While saving a voucher, it is  mandatory to check if the debit and credit amounts are equal.

DeleteControlField Example

In any conventional system, the master information should not be allowed to be deleted in case it has been used in any transaction. For instance, say an ItemName in the ItemMaster should not be allowed to be deleted if it is used in any invoice. To bring about this control, the number of  transactions in which the selected item is used is retrieved into a field, say ,CountField. Another inputfield is created where the Expression is set as IIF(CountField <= 0, {T}, {F}) and then the DeleteControlField is set to this InputField.