Table Framework in TDL
In TallyPrime, the artifact Table is also known as Collection has undermined ground-breaking transformation to aid developers in providing better user experience as well as write optimised code.
General Enhancements in Table
New table capabilities have been provided to benefit the developers to enhance the user experience of the pop-up table.
Attribute – Table Sort
The attribute Table Sort is introduced at the definition type Collection or Table. This attribute allows sorting the table on any column. By default, the sorting method would be in ascending order, and the expression must be prefixed with a hyphen (-) to instruct the system for sorting in descending order. A keyword Default is provided to populate the table in the order; it has been inserted.
Syntax
Table Sort : [-]<Method Name / Formula / Function>
Example
[Table: Configure Table Style]
Align : Center
Style : Small Bold
Format : $Name, 45
Format : @@TableItemValue, 25
Table Sort : Default
Points to Remember
- Table Sort is a single list attribute.
- Table Sort sorts the column as per the datatype.
- For sorting value in descending order, hyphen (-) should be prefixed to the expression. For example, Table Sort: -$Date; sorts the items in descending order of the dates data type.
- If descending of a system formula expression needs to be specified, the hyphen must be specified with the prefixing System Formula and not as a part of the Formula, for example, Table Sort: -@@TableItemValue.
Default Keyword in Table Sort
- When the Default keyword is specified as attribute value, the table is displayed as the data is gathered.
- In the table, all the sort methods given after Default is ignored, as the gathering order is unique, and any attribute value specified after that becomes meaningless.
Example
Attribute Value |
Behaviour |
Default |
Values are sorted as inserted. |
$Name, Default |
Values are alphabetically sorted, but in case of values have the same names, they are sorted as inserted. |
$Name,Default, $Parent |
Values are alphabetically sorted, but in case values are same, they are sorted as inserted, and third sort key is ignored. |
Let us take an example where a collection is a union of two collections of 2 different object types, i.e., Ledger and Stock Item.
[Collection : All Ledgers and Stock Item]
Title : “List Of Ledgers and Stock Item”
Sub Title : $$LocaleString:”Particulars”,$$LocaleString:”Parent”
Sub Title : $$LocaleString:”Master Type”, $$LocaleString:”Last Voucher as on”
Collections : All Ledgers, All Stock Items
Format : $Name, 25
Format : $Parent, 15
Format : $$Type, 10
Format : $LastVoucherDate
Table Sort : $LastVoucherDate
Align : Center
[Collection : All Ledgers]
Type : Ledger
Format : $Name, 25
Format : $Parent, 15
Format : $$Type, 10
Format : $LastVoucherDate
Table Sort : $LastVoucherDate
[Collection : All Stock Items]
Type : Stock Item
Format : $Name, 25
Format : $Parent, 15
Format : $$Type, 10
Format : $LastVoucherDate
Table Sort : $LastVoucherDate
For depicting the behaviour, we have created a ledger and a stock item by the name “Samsung A50”.
Currently, we have not specified any sorting method; hence the complete list is being sorted based on values in column 1, i.e., Name of the Object. In the case of Field populating multiple tables and table sort attribute across collections, Table Sort depends on the attribute Title. The below table shall explain the scenario.
Sl. No. |
Particulars |
Title |
Table Sort |
Conclusion |
Multiple Collection – Table Sort |
||||
1 |
First Collection |
Y |
Y |
The sorting would be based on First Collection criteria |
Second Collection |
Y |
Y |
||
2 |
First Collection |
Y |
N |
Title is specified in both the collections; hence sorting would be based on the first Collection. Since the first Collection does not have table sort, the resultant table shall be presented in the order of insertion |
Second Collection |
Y |
Y |
||
3 |
First Collection |
N |
Y |
The sorting would be based on Second Collection criteria as the title attribute is found in the second Collection |
Second Collection |
Y |
Y |
||
4 |
First Collection |
N |
N |
The sorting would be based on Second Collection criteria |
Second Collection |
Y |
Y |
||
5 |
First Collection |
Y |
N |
The first Collection has Title; however, there is no Table Sort specified. Hence, the resultant table shall be presented in the order of insertion |
Second Collection |
N |
Y |
||
6 |
First Collection |
N |
Y |
In the first Collection, Table sort has been specified; however, Title is specified in the second Collection. Since there is no Table sort mentioned in the second Collection, the resultant table shall be presented in the order of insertion |
Second Collection |
Y |
N |
||
7 |
First Collection |
N |
Y |
The first Collection does not have Title specified; however, there is Table Sort specified. Hence the sorting would be as defined in the first Collection. |
Second Collection |
N |
Y |
||
8 |
First Collection |
N |
Y |
‘Title’ has not been specified in any of the Collection, and Table Sort is specified in the first Collection. Hence the sorting would be as defined in the first Collection. |
Second Collection |
N |
N |
||
9 |
First Collection |
N |
N |
Since ‘Title’ is not specified in any collection and table sort is not found in the first Collection, Table sort is ignored across all the collections though found. |
Second Collection |
N |
Y |
||
Union Collection- Table Sort |
||||
10 |
Table sort specified in the Union Collection only shall be considered and not the individual Collections irrespective of the presence of the Attribute Title. |
|||
Union Collection and Summary Collection – Table Sort |
||||
11 |
Table sort specified in the Summary Collection only shall be considered and not the Source Collection. |
Attribute – Allow Noise Chars
The design of Tally, being intuitive and flexible, allows the users to search through the table ignoring the noise characters, for instance, ABC Co. Ltd is matched even on typing ABCCoL without the noise characters. The spaces, hyphens, comma, and so on are ignored for the user to type only the significant portion of the text.
While we extend the flexibility with this for most of the cases, there are cases like selection of the file folder path where these noise characters differentiate the item. There could be folders with the names TallySolutions and T ally Solutions where all the items must be uniquely selectable if shown in a list. An attribute Allow Noise Chars is supported in the Collection to aid the scenario, the default value being No. There is an alias Table Has Path for this attribute.
Syntax
Allow Noise Chars : <Logical Value>
OR
Table Has Path : <Logical Value>
Example
[Collection: MultiFile Selection Child Table]
Title : $$LocaleString:”File Selection”
Parm Var : PVCurrentPath : String : @@LocalTDLPathRoot
Data Source : File Selection List : ##PVCurrentPath
Set as : $Name
Format : $Name, 35
Format : @@FileFolderFormat, 15
Table Sort : Default
Table Has Path : Yes
Attribute – Advanced
There are some table experiences where initially only minimal list should be shown by default. When the user searches for an item which is not available in the visible list, then hidden objects should appear in the list. To facilitate this experience, a new Attribute at Collection, Advanced is introduced. This attribute would allow the possibility of having hidden objects in a table. These objects would be gathered at the time of Table construct; however, on-demand, these objects would dynamically appear in the Table list.
Syntax
Advanced : <Logical Expression>
Example
[Collection: CMPDefault Countries]
Use : CMPAll Countries
Compute : Type : “Country”
Compute : Country : $Name
Advanced : ($ListingLevel = 2 AND NOT ##CountryShowMore) OR $ListingLevel = 3
Formatting Attributes in Table
The Table is widely used across many areas within the application like Configuration Settings, GoTo reports, More details, and so on. Hence Tables required formatting to differentiate the objects with one another. Various formatting attributes in the Table have been introduced in the product to enable the application developers to achieve these requirements.
Attribute – Color
Attribute Color is supported with the definition type Collection/Table to facilitate the application developers to provide text color for the desired items within the table.
Syntax
Color : <Expression / Color Definition Name>
Example
[Collection: MoreDetails Template]
Title : IF $$IsTDSRate Then @@ListofTDSTitle Else IF $$IsBudget Then @@ListofBudgetTitle +
Else IF $$IsTariffClassification Then $$LocaleString:”List of Excise Classification +
Details” Else $$Sprintf:”List of %s Details”:$$Type
Set as : $Name
Color : “Deep Grey” : NOT $FeatEnabled
Color : “Black” : $$IsLabelObject
Attribute – Style
The attribute Style is supported with the definition type Collection / Table to facilitate the developers to apply the desired style for the required items within the table.
Syntax
Style : <Comma>
Example
[@Collection: GT Report List Template]
Use : Report List Template
Style : Small Bold : $IsGroupLabel
Attribute – Column Align
The Attribute Column Align is introduced at the definition type Collection / Table to facilitate the developers to provide alignment for all the columns within a specific table. It is a single list attribute where every subsequent value is used for the corresponding format expression.
Syntax
Column Align : <Comma separated Align Keywords>
Example
[@Collection: GT Report List Template]
Use : Report List Template
Column Align : Left, Right
Object Enhancements in Table
Apart from external methods, Object definition is now enhanced to support various attributes as per the design requirements.
Attribute – Action
New attribute Action has been introduced at Object definition. This attribute accepts a Label, an Action Keyword along with the Parameters of the Action. At the interface element, various objects are associated through the field table, and on the selection of an object, the corresponding object action gets identified and invoked.
Syntax
Action : <Label> : <Action keyword> : <Action Parameters>
Example
[Object: SelectDrives]
Use : Action Object
Name : If @@IsCurrPathRoot Then “” Else $$SysName:Drives
IsActive : Yes
Action : Set Root : Set : vCurrentPath : @@RootName
Action : Set Root : Change Table : $$CurrentTable : No : @@TableDefaultCursor
Action : Set File Root : Set : vCurrentPath : @@RootName
Action : Set File Root : Change Table : $$CurrentTable : No : @@FileTableDefaultCursor
The set of actions can be grouped with the help of label specified at the attribute. Multiple Actions can be specified with the same label to execute these actions in a sequence.
The enhancement, ensures brevity of code, thus making it easier for the developers. Aiding this component, an action Execute Obj Actions has been introduced which can be invoked through a new Field attribute Act on Table Element.
Attribute – Behave As
The Object attribute Behave As allows to specify the behavior of the Object when populated in the table, thus defining the formatting and placement of the object in the Table. Action, Config, Default, External Action, On the fly, Label. Act As is an alias to Behave As.
Syntax
Behave As : <Keyword>
Example
[Object: Action Object]
Behave as : Action
[Object: Config Object]
Behave as : Config
[Object: On The Fly Object]
Behave as : On the Fly
[Object: Label Object]
Behave as : Label
[Object: External Action Object]
Behave As : External Action
There are few rules/keywords that are provided to decide the behavior of an object.
Keyword – Default
The Object Attribute, Behave As Keyword, Default is used to specify when as an object for selection. In the absence of the attribute, Behave As, this is the default value.
Example
[Object: CurrentPath]
Name : If @@IsCurrPathRoot Then $$SysName:Primary Else ##vCurrentPath
Full Width : Yes
Action : Set Primary : Ignore Field : Yes
Keyword – Label
The properties of an Object behaving as a Label is to expand and collapse the hierarchical elements exploded from the current Label Object and should be an unselectable item.
As seen in the image above, Printer Settings, Header Information, and Company Details are the Label Objects.
Example
[Object: Obj Accounting Masters CreateAlter]
Use : Obj Accounting Masters Template
Behave As : Label
Output
Keyword – Config
The properties of an Object behaving as a Config is to set the variable values and is an unselectable item. To regather the table to reflect the change in the variable values, the Field Attribute, Process Change Table or Cyclic Behavior must be set to Yes.
In the image above, on pressing enter on Show Date Range of Report, the logical value No toggles to Yes and vice versa without selecting the item in the Field.
Example
[Object: Cfg Settings DateAndNumberFormat]
Name : @@ChangeDateNumFormatStr
VarValue : @@ValueExistsString
Behave As : Config
Action : Set Config : Modify Variables : DateAndNumber Format Configure
Output
Keyword – Action and External Action
The properties of an Object behaving as an Action or an External Action is
- To appear as a separate section above all the items at the top of the Table
- To appear towards the right within a table.
- To have a line separator after all the actions.
There are 2 action keywords:
- Action – Action Objects are not selectable objects which operate on the list like expanding or contracting the list of objects in the table, for instance, Show More/ Less, Show Inactive, and so on.
- External Action – Actions which invokes subsequent reports on selection like Create Master, Alter Mater, etc. which are required to be on the top of the list but must be selectable.
In the screen capture above,
- The objects above the separator lines are Action Items.
- Create Voucher, Create Master and Alter Master are Objects behaving as External Action.
- Expand All, Show More are Objects behaving as Action.
Example
[Object: GT CreateVoucherNested]
Name : $$SysName:CreateVoucher
Behave as : External Action
Action : Goto Action : Create : Accounting Voucher
Action Filter : NOT ##IsOutputOnly
[Object: GT Primary ShowMoreLess]
Use : GT Default Methods
Name : If ##ShowBasicGroupsOnly Then $$SysName:ShowMore Else $$SysName:ShowLess
Behave as : Action
Action : TableActions : Set : ShowBasicGroupsOnly : NOT ##ShowBasicGroupsOnly
Action : TableActions : Set : ShowBasicReportsOnly : NOT ##ShowBasicReportsOnly
Output
- Go To Report screen
With the Keywords, Action and External Action, the text is automatically positioned to the right of the Table and appears as a separate section above the horizontal line.
Keyword – On The Fly
Usually, when user keys in a value that is not in the list, an error message is shown as Spelling Error. Objects with the Keyword On The Fly is designed to appear at the top of the Table; similar to Action and External Action. When the table does not contain the items with text entered by the user, this text appears next to the On the Fly Object. The corresponding actions specified against On the Fly Objects are executed when the user has entered a new value.
Example
[Object: New Bank]
Name : $$SysName:NewBank
Behave As : On the Fly
Output
As you can view in the screen, since Gram does not exist in the created database, it appears as a suggestion near New Bank for creation.
Attribute – Full Width
At collection definition column widths are specified with attribute Format. However, if the maximum space is required for an Object, where the value of the object is dynamic, Full Width can be specified.
Syntax
Full Width : <Logical Value>
Example
[Object: Current File Path]
Behave As : Label
Name : If @@IsCurrPathRoot Then $$SysName:Primary Else ##vCurrentPath
Full Width : Yes
Output
Table Enhancements in Other TDL Artefacts
New Attributes
At Field definition, developers can provide pop-up list through attribute Table. To enhance the user experience while the Table is displayed, few attributes have been introduced.
Field Attribute – Default Table Item
Field attribute Default Table Item when specified places the cursor on the specified item when the Table appears in the Field. If none of the Table objects satisfies the given condition, the cursor is placed at the top of the table depending on the value of the Field attributes Skip, SysName ,or Skip actions.
Syntax
Default Table Item : <Logical Expression>
Example
[Field: UNT GST UQC]
Use : Name Field
Storage : GSTRepUoM
Table : ListOfGSTUQC, NotApplicable, New UQC
Show Table : Always
Default Table item : $$IsSysNameEqual:NotApplicable:$Name
Below is the Table for the behaviour of Default Table Item when other dependent attributes like Set as, Info and SkipSysName are specified.
Field Value |
Default Table Item |
SkipSysName |
Outcome |
Yes |
No |
No |
The cursor would be placed to the value matching the field value. If the value does not match, then would be positioned to the first value. |
Yes |
No |
Yes |
The cursor would be placed to the value matching the field value. If the value does not match, then would be positioned to the first value after the SysNames. SkipSysNames is applied. |
Yes |
Yes |
Yes |
Since field value is specified, “the table cursor tries to be placed on the value matching the field value. If the field value does not match, then the cursor would be placed on the first item matching the default table item expression. If none of the items matching the default table item, the cursor would be positioned on the first value after the SysNames. |
No |
Yes |
Yes |
The field value is not specified; hence the condition with ‘Default Table Item’ is evaluated and if no Items found matching the condition, the cursor would be placed on the first item after the SysNames. |
No |
Yes |
No |
The cursor is positioned to the value that satisfies the condition provided in ‘Default Table Item’. In case of no text meets the given condition, the cursor is positioned on the first item in the Table. |
No |
No |
No |
The cursor is positioned on the first value in the Table. |
Field Attribute – Process Change Table
In general, the behaviour of the table in a field is a flat selection of value once the value is selected; the cursor moves to the next Field.
The new capability broke this behaviour of the Table. The cursor stays on the same Field with the new experiences. When there are changes in the value of the table items, the table must regenerate to populate the updated value against the items. Hence, to aid this refreshing behaviour of the table within the same instance of the Field attribute Process Change Table has been introduced. The alias is Cyclic Behavior.
The attribute Process Change Table allows the Field to regather the existing table with the latest updated values of the same table and continues to focus cursor on the same Field.
Syntax
Process Change Table : <Logical Value>
Example
[Field: Exceptions Template]
Width : @@MSTTriggerWidth
Max : 52
Style : Normal Bold
Show Table : Always
Default Table Item : NOT $$IsLabelObject And NOT $$IsActionObject
Process Change Table : Yes
Field Attribute – Act on Table Element
The field attribute Act on Table Element empowers the application developers to invoke the actions corresponding to the selected object from the table. A new Action Execute Obj Action is introduced to execute the Object Actions corresponding to the specified label.
Syntax
Act On Table Element : <Logical Formula> : <Action Keyword> : <Action Parameters>
Example
[Field: File Selection Template]
Use : Name Field
Set Always : Yes
Width : @@LongWidth
Show Table : Always
Set as : ##vCurrentFile
Table : Current File Folder, Provide File Path, SelectFileDrives
Process Change Table : Yes
Act on Table Element : @IsDirectory : Execute Obj Actions : Set File Directory
Act on Table Element : @IsUp : Execute Obj Actions : Set File Parent Directory
Act on Table Element : @IsRootSelected : Execute Obj Actions : Set File Root
Act on Table Element : @SpecifyPath : Execute Obj Actions : Set Path
[Collection: Select File Drives]
Title : $$LocaleString:”File Selection”
Object : SelectDrives, ShowMoreLess
Client Only : Yes
Filter : IsActiveObj
[Object: SelectDrives]
Use : Action Object
Name : If @@IsCurrPathRoot Then “” Else $$SysName:Drives
IsActive : Yes
Action : Set Root : Set : vCurrentPath : @@RootName
Action : Set Root : Change Table : $$CurrentTable : No: @@TableDefaultCursor
Action : Set File Root : Set : vCurrentPath : @@RootName
Action : Set File Root : Change Table : $$CurrentTable: No : @@FileTableDefaultCursor
Field Attribute – Act on Backspace
The attribute Act on Backspace determines the action that should happen on pressing backspace key from the table. In other words, Actions to be executed on hitting backspace key are considered from the Object matching the given logical expression corresponding to the specified label.
Syntax
Act on Backspace : <Logical Expression> : <Label>
Example
[Field: File Selection Template]
Use : Name Field
Set Always : Yes
Width : @@LongWidth
Show Table : Always
Set as : ##vCurrentFile
Table : Current File Folder, Provide File Path, SelectFileDrives
Process Change Table : Yes
Act on BackSpace : @@IsSysNameUp : Set File Parent Directory
[Object: Path Selection]
Action: Set File Parent Directory:Set : vCurrentPath : $$GetParentDirectory:##vCurrentPath
Action: Set File Parent Directory:DoIf:@@IsCurrPathRoot:ChangeTable:$$CurrentTable:No +
: @@FileTableDefaultCursor
Action: Set File Parent Directory: DoIf: NOT @@IsCurrPathRoot: Change Table: $$CurrentTable:+
No : @@IsSysNameUp
On hitting backspace key, the above 3 actions with the label Set File Parent Directory is invoked.
Field Attribute – Skip Action
The attribute Skip Action when enabled; position the table cursor on the first element/object below the actions
Syntax
Skip Action : <Logical Value>
Example
[Field: PyrlEmpFilter ModeofPymt]
Use : Name Field
Storage : Name
Table : Employee BankMode, EmployeeTransTypeShowMore : $$Line = 1
Table : Employee BankMode, End of List, EmployeeTransTypeShowMore : $$Line > 1
Skip Actions : Yes
Attribute Value for Show Table – Always And Never Hide
The attribute value Always and Never Hide, would display the Table in the Field always ignoring the key that allows hiding the table.
Syntax
Show Table : Always and Never Hide
Example
[Field: SelectCompanyPath]
Use : Name Field
Set Always : Yes
Width : @@LongWidth
Max : @@MaxNarrWidth
Show Table : Always and Never Hide
New Actions
Execute Obj Actions
The action Execute Obj Actions works in conjunction with the ability to define Action at object level against a label. Since it requires an Object context, the Action is expected to be used at Field definition where Table exists along with attribute Act on Table Element.
Syntax
Execute Obj Actions : <Label>
Example
[Field: CoA List Of Accounts]
Use : COA Other Masters
Act On Table Element : Yes : Execute Obj Actions : CoA
Change Table
The action Change Table can be used with the Object Attribute Action to allow populating different tables. The action empowers developers to provide an effect of drill down from a table to another within the same Field.
Syntax
Change Table : <TableName/Current> [:<Logical Expression1> [:<Condition>[:<Logical Expression2>]]]
Where,
<Table Name/ Current> $$CurrentTable to bring up Current Table again with refreshed values or specify one or more Tables if new tables need to be populated on selecting the current Object. It is a mandatory parameter.
<Logical Expression1> to allow to stack the tables such that previous tables shall be available on hitting Esc. The value is optional and the default is No.
<Condition> to identify the item and place the cursor by default on the first matching item. This is also optional.
<Logical Expression2> it retains exploded state of the table. The value is optional and default is No.
Example
[Object: App Config ShowMoreLess]
Use : GT Default Methods
Name : If ##ShowBasicOnly Then $$SysName:ShowMore Else $$SysName:ShowLess
Behave as : Action
Action : SetVar : Set : ShowBasicOnly : NOT ##ShowBasicOnly
Action : SetVar:Change Table:$$CurrentTable:No:$$Type = “App Config ShowMoreLess”
Output
Clear Table Stack
Action Change Table allows for stacking the Table. When the stacked tables are not required, action Clear Table Stack can be used to clear the same such that when the user navigates using Esc, one does not need to go back through all the stacked tables.
Syntax
Clear Table Stack
Example
[Object: New Country]
Use : Action Object
Name : @@NewCountry
Action : ChangeStateCountry: Change Table : CmpAllStatesofCountries, Not Applicable,
NewStateTable, ChangeCountry : Yes : NOT $$IsActionObject
Action : ChangeStateCountry : Clear Table Stack
Output
Cycle Back
The action Cycle Back allows returning to the previous stacked table. The behaviour is similar to the escape key. If a Table Object Back needs to be presented for user to move Back, this helps as an Object Action to move back.
Syntax
Cycle Back
Example
[Object: Obj Alter Cycle Back]
Name : $$SysName:Back
Behave As : Action
IsAlter : Yes
Action : TableAction : Cycle Back
Output
Ignore Field
The action Ignore Field allows ignoring the value of the Field, i.e.; the selected object is not placed in the Field.
Syntax
Ignore Field :<Logical Expression>[:<String Expression>]
Where,
< Logical Expression> whether to clear the text of the Field
< String Expression > string to which the expression to reset to Table match
Example
[Object: CoATemplate]
Action : CoA : Display : List of Accounts
Action : CoA : Ignore Field : Yes
Output
New Functions
$$CurrentTableObj
The function CurrentTableObj evaluates the parameter in the context of the current selected table Object.
Syntax
$$CurrentTableObj:<Expression>
Example
[Field: ImportFile]
Use : File Selection Template
Modifies : ImportFile : Yes : $$TableObj:ImportFile:$Path
Case : Normal
Width : @@LongWidth+10
Max : @@MaxNarrWidth
Act on Table Element : (@ShowMore OR @ShowLess) : Execute Obj Actions : ShowMoreLess
ShowMore : ($$IsSysNameEqual:ShowMore:($$CurrentTableObj:$Name))
ShowLess : ($$IsSysNameEqual:ShowLess:($$CurrentTableObj:$Name))
$$CurrentTable
The function CurrentTable enables the developer to refer to the current table. This function is beneficial when the existing table from the Field has to be called with some value changes.
Syntax
$$CurrentTable
Example
[Object: CoAShowinactiveMasters]
Behave as: Action
Name : If ##ShowHideInactive Then $$SysName:HideInactive Else $$SysName:ShowInactive
Action : Config Action: Set : ShowHideInactive : NOT ##ShowHideInactive
Action : Config Action: Change Table:$$CurrentTable:No:$$Type= “CoAShowinactiveMasters”
$$IsOnTheFlyItemSelected
The function IsOnTheFlyItemSelected allows identifying whether the selected object from the table is On The Fly, object.
Syntax
$$IsOnTheFlyItemSelected
Example
[Field: EI BuyerGVAT POSCountry]
Use : Name Field
Set as : #SupplCountryName
Set Always : Yes
Storage : PlaceofSupplyCountry
Table : ListOfCountries,NotApplicable,NewCountryName, CompanyCreatedCountry
Trigger : NewCountryValName : $$IsSysNameEqual:NewCountry:$$EditData
Act on Table Element : $$IsOntheFlyItemSelected : Set : NewCountry : $$GetOnTheFlyString
$$GetOnTheFlyString
When an object has Behave As : On the fly, the user may type a value that does not exist in the list. The value is displayed in the Table list on the left corner against the On the Fly Object. The function GetOntheFlyString returns this value within the Object Context.
Syntax
$$GetOnTheFlyString
Example
[Object: Provide File Path]
Use : On The Fly Object
Name : $$SysName:ProvidePath
IsActive : Yes
Action : Set Path : Set : On The Fly Path : $$GetOnTheFlyString
$$IsActionObject
The function IsActionObject returns True if the object is an Action or an External Action Object.
Syntax
$$IsActionObject
Example
[Field: DYBK Chg Vch Type]
Use : Create VoucherType
Width : @@NameWidth
Max : @@MaxNameWidth
Case : Title Case
Style : Normal Bold
Show Table : Always
Default Table Item : NOT $$IsActionObject
$$IsLabelObject
The function IsLabelObject returns True if the Object is a Label Object.
Syntax
$$IsLabelObject
Example
[Collection: MoreDetails Template]
Set as : $Name
Color : “Deep Grey” : NOT $FeatEnabled
Color : “Black” : $$IsLabelObject
$$IsConfigObject
The function IsConfigObject returns True if the object is a Config Object.
Syntax
$$IsConfigObject
Example
[Table: Connectivity Settings Configure List]
Use : Config Table Template
Fetch : ShowAdvance
Style : Normal Bold : $$IsConfigObject
Hierarchical Table
The capability of a collection as Table has always been quite a restricted area for developers to do wonders. With the new capabilities,’ developers can now represent a Table in a hierarchical form. With the introduction of new Table attributes, a hierarchical Table can be generated.
Table Attribute – Explode
A new Attribute Explode is introduced at artefact Table or Collection to allow the developer to provide the user with a Hierarchical view.
Syntax
Explode : <Collection Name>[:<LogicalCondition1>[:<Logical Condition2>]]
Where,
<LogicalCondition1> when this condition is satisfied, the artefact understands which Collection to trigger.
<LogicalCondition2> this implies whether the Collection should be exploded when the table is first populated.
Example
[Collection: MailPreview Configuration]
Title : $$LocaleString:”List of Configurations”
Object : MailPreview ConfigTitle
Explode : MailPreview Details : $Name = @@MailConfig
Points to remember
- Providing condition to explode is optional when the condition is not provided; the table always explode.
- Any formatting attributes of the Collection would be ignored when they are used as an exploded collection.
- Although there are no specified restrictions on the level of exploding, it is recommended to restrict up to a maximum of two levels.
- To improvise experience & performance in Remote, suggested to use Fetch Collection at Report level and fetch all the collections including the exploded collections.
- Incase’ Child of’ is used in explode Collection for filtering, Parm Var is mandated for Remote.
- System Names can not be used at the exploded table
Table Attribute – Indent
To depict the hierarchical parent child relation in a table, an Attribute Indent is introduced at the Table Definition. While indent is not restricted to Explode collections; it is mostly applied in the exploded table.
Syntax
Indent : <Numeric Formula>
Example
[Collection: Folder Selection Table]
Use : Current Path Explode Details
Title : @@FolderSelectionTitle
Data Source : Directory Selection List : ##vDataFolderPath
Format : $Name, 35
Format : @@TableFolderFormat, 15
Indent : $$TableExplodeLevel * 2
There are a few functions have been introduced, to aid the exploded Tables.
$$TableExplodeLevel
The function TableExplodeLevel returns the explode level of the current Table thereby enables the developers to specify the dynamic value for Indent. The data return type is long, i.e. numeric value.
Syntax
$$TableExplodeLevel
Example
[Collection: Folder Selection Table]
Use : Current Path Explode Details
Title : @@FolderSelectionTitle
Data Source : Directory Selection List : ##vDataFolderPath
Format : $Name, 35
Format : @@TableFolderFormat, 15
Indent : $$TableExplodeLevel * 2
$$TableExplodeOwner
The function TableExplodeOwner evaluates the parameter in the context of the current exploded table’s owner Table. The function evaluates the value while the Table is being gathered. The data return type depends on the method specified in expression.
Syntax
$$TableExplodeOwner:<$MethodName>
Example
[Collection: Other Voucher Type Explode]
Use : Other Voucher Type
Parm Var : pvExpVoucherType : String : $$TableExplodeOwner:$Name
$$CurrentTableItemExplodeOwner
The function CurrentTableItemExplodeOwner evaluates the method in the context of the exploded Owner Table of the current selected Object.
Syntax
$$CurrentTableItemExplodeOwner
Example
[Field: Backup Name]
Use : Backup Company Selection
Set as : $Name
CommonTable : No
Width : 35
Modifies : SVBackupSrc :Yes : If ##IsTADSTable Then $$CurrentTableItemExplodeOwner +
: $Name Else ##vCurrDataPath
Amendments in Browser Reports
The customised reports could be viewed in a browser, and there were few lines of code which was required to be added from Tally.ERP 9 Release 6.6.1. However, from TallyPrime Release 1.0, the attributes Definition Name and IsCollection at Object definition has been eliminated.
Two new attributes have been introduced at Object Definition, that would allow displaying report and display collection in the browser.
Attribute – Current Report
The attribute Current Report at the object definition allows providing the name of a report which is required to be in the browser list.
Syntax
Current Report : <Display Report Name>
Example
[Object: GT Trial Balance]
Use : GoTo Report Obj
Name : $$LocaleString:”Trial Balance”
Current Report : Trial Balance
Attribute – Current Collection
The attribute Current Collection at the object definition allows providing the name of a report which is required to be in the browser list.
Syntax
Current Collection : <Display Collection Name>
Example
[Object: GT Group Overdue Receivables]
Use : GoTo Group Obj
Name : $$LocaleString:”Group Overdue Receivables”
ViewName : $$LocaleString:”Overdue Receivables”
Current Collection : Group Overdue Receivables