Table of Contents

 

Field

A field is place where the data is actually displayed or entered. It belongs to a Line, which belongs to a Part, which belongs to a Form. A field can have sub fields as well.

Syntax

[Field: <Field Name> ]

Example

[Field: TSPL Field]

 

➥ Download the Field Samples

Sample File  Attributes
FormatReport Align, Background, Border, Border 3D, Color, FG Highlight, Format, Full Width, Indent, Line, Print BG, Print FG, Print Style, Space Left, Space Right, Style, Type, Width
SpecialInputField ASCII Only, Cancel, Control, Info, KBLanguage, Local, Local Formula, Max, Notify, Tooltip, Valid, Read Only
RepeatedTableStorage Common Table, Default Table Item, Is ODBC Table, Skip, Storage, Sub Title, Table, Table Search, Unique, Use, Wide Space, Trigger, Dynamic, Skip Action, Skip SysNames, On, Key
TabularDisplay Add/Replace/Delete, Alter, Cell, Display, DMPMode, JSON Tag, Pre Printed, Pre Printed Border, Quick Search, Skip Cell, Variable, XMLAttr, Fixed, Scroll, Scale
CyclicTable Act on Table Element, Cyclic Behavior, Set As, Set Always
AutoColumn Bound, Field, Invisible
GraphReport Graph Label, Graph Value, Graph X Axis Legend Title, Modifies, Option, Set By Condition, Switch
SubForm Subform, Case
ExcelFormula Excel Formula
SkipForward Skip Forward

 

Attributes

In TallyPrime, a Table is far more than a simple UI component for selecting values from a flat list. It acts as a dynamic interaction layer that can support multiple behaviors such as creating new objects, navigating through hierarchies, switching to related actions, expanding or collapsing the number of visible items using Show More and Show Less, and much more. Achieving this behavior involves the combined working of several attributes across the Field, Collection, and Object definitions.

The Act on Table Element attribute plays a key role in enabling such dynamic interactions. It executes a specified action when a table element is selected and the given condition evaluates to true. At first glance, it may appear similar to the attributes Trigger and TriggerEx, but its scope and use cases are much broader.

This attribute is especially important in scenarios involving cyclic table behavior, where the attribute Process Change Table is set to Yes. When Table is just a flat list of selection, user just selects an item and the cursor moves forward. But when something more is required, especially when the table shown needs to refresh and show new values based on a selection made, it is required to tell the system to change certain variables or perform some action to show the changed table. This is where Act on Table Element becomes essential.

Most commonly, this attribute is used to perform actions like:

  • Setting variables using the Set action
  • Executing object-level actions through Execute Obj Action

the Object associated with these actions belongs to the Collection specified in the Field’s Table attribute. When the user selects an element from the table, the system evaluates the Act on Table Element attribute and performs the corresponding action if the condition is satisfied.

When Act on Table Element, Trigger, and TriggerEx are all specified in a Field, they are evaluated in the following order:

  1. Act on Table Element
  2. Trigger
  3. TriggerEx

Even if Act on Table Element executes successfully, the Trigger attribute will still be evaluated. However, if Trigger gets executed, TriggerEx will be ignored.

Syntax

Act On Table Element : <Logical Condition> : <Action Keyword> : <Action Parameters>

<Logical Condition> is a logical value or expression that evaluates to a logical value where the condition is usually related to the specific item of the table

<Action Keyword> and <Action Parameters> depends on the action that needs to be performed

Example

[Field: TSPLChange Table]
Use                  : Name Field
Table                : TSPLList of Stock Group
Show Table           : Always and Never Hide
Act On Table Element : Yes : Execute Obj Actions: TSPLChildStockItem
Process Change Table : Yes

[Collection: TSPLList of Stock Group]
Title : “List of Stock Group”
Type  : Stock Group
Format: $Name,20
Align : Center

[#Object: Stock Group]
Action : TSPLChildStockItem: Set: TSPLStkGroupName: $$CurrentTableObj:$Name
Action : TSPLChildStockItem: Change Table: TSPLChildStockItemCollection

[Collection: TSPLChildStockItemCollection]
Title    : “Stock Item of ” + ##TSPLStkGroupName
Type     : Stock Item
Child Of : ##TSPLStkGroupName
Align    : Center
Format   : $Name,25

[System: Variable]
TSPLStkGroupName : “”

[Variable: TSPLStkGroupName]
Type : String

Explanation

In this example,

  1. The field TSPLChange Table initially shows list of stock groups for selection via the Table attribute of field with collection TSPLList of Stock Group
  2. Process Change Table: Yes is specified to indicate Table needs to be refreshed
  3. Act on Table element gets executed as soon as a Stock group is selected, calling the action Execute Obj Actions that executes the object action specified with label TSPLChildStockItem one after the other.
  4. In the action attribute of the modified stock group definition, TSPLStkGroupName variable is set with the selected stock group. Another action attribute calls action ‘Change table’ that specifies a new collection ‘TSPLChildStockItemCollection’ where the variable is used to populate stockitems of selected Stock group. This collection is used to repopulate the values shown in the table associated with the field.

Once a stock item is selected, the ‘act on table element’ attribute fails to execute as there is no action attribute specified in the Stock Item Object definition with label TSPLChildStockItem

Have you ever noticed how the text in TallyPrime feels clean, structured, and easy to read? One of the reasons is the thoughtful alignment of different types of data. Prompts, descriptive text, numbers, and amounts are aligned differently, making the information easier to scan and understand at a glance.

This is made possible using the Align attribute of a Field. The attribute determines how the content within a field is positioned with respect to the field boundaries. Proper alignment not only helps visually differentiate different types of data, but also supports language-specific reading directions and improves the overall user experience.

For example:

  • Text and prompts are typically left-aligned for natural reading flow.
  • Numerical values and amounts are often right-aligned to make comparisons easier.
  • Alignment can also be adapted for languages with different reading directions.

By default, field data in TallyPrime is aligned to the Left.

Syntax

Align: <System Alignment Keyword>

<System Alignment Keyword> can be expression that evaluates to one of the keywords – Bottom, Center, Centre, Justified, Left, Prompt, Right, Top

Example

[Field: TSPL Amount Field]
Width: 30
Align: Right

Explanation

The example shows that the data in the field TSPL Amount Field will be aligned to right with the specification of the Align attribute.

One of the most powerful usability features in TallyPrime is the ability to create or modify data in-place, without leaving the current screen. For example, while entering a voucher, if you need to change the details of a ledger master, you do not have to exit the voucher and risk losing your progress. Simply pressing Ctrl + Enter on the ledger field instantly opens the Ledger Alteration screen. Once the changes are saved, you are seamlessly brought back to the voucher with the cursor positioned exactly where you left off. This smooth workflow is consistently available across most screens and reports in TallyPrime.

This behavior is enabled using the Alter attribute of a Field. The attribute accepts a Report Name as its parameter. When invoked, the specified report is opened in Alter Mode, automatically taking the context of the object associated with the field from which Ctrl + Enter was pressed. This allows users to modify existing data contextually and continue their work without interruption.

Syntax

Alter: < Report Definition Name>[:<Logical Expression>]

<Report Definition Name> is the name of the report that needs to be altered

<Logical Expression> is the condition that needs to be met for the report to be opened in alter mode when Ctrl+Enter is pressed

Example

[Part: TSPL Ledger Details]

    Line   : TSPL Ledger Line
Repeat : TSPL Ledger Line : Ledger
Scroll : vertical

[Line: TSPL Ledger Line]

    Field : TSPL Ledger

[Field: TSPL Ledger]

    Use   : Name Field
Set as: $Name
Alter : Ledger

Explanation

This example shows a part TSPL Ledger Details having line TSPL Ledger Details that repeats on Ledger objects specified via Repeat attribute. The repeating line has a field TSPL Ledger which shows the ledger name specified using the attribute Set as. The attribute Alter in the field definition indicates that, when Ctrl + Enter is pressed on the field TSPL Ledger, the report Ledger is opened in alteration mode of the corresponding Ledger shown in the field.

For example if ‘Cash’ was the Ledger shown in the field, on pressing Ctrl+Enter, Ledger Report of the ‘cash’ ledger opens in alteration mode.

Although TallyPrime is inherently multilingual and allows users to enter data using any keyboard language, certain fields require values strictly in ASCII characters. Examples include fields such as GSTIN, PAN, TIN, and certain password fields, where the entered data must conform to a standard ASCII format regardless of the active keyboard language.

In these cases, the attribute ASCII Only is used, giving flexibility to the user to use any Keyboard language, while making sure only right data is entered in such fields.

Syntax

ASCII Only: <Logical Expression>

<Logical Expression> is expression that evaluates to a logical value.

Example

[Field: TSPL GSTIN]

    Storage    : GSTRegNumber
AscII Only : Yes

Explanation

The field TSPL GSTIN takes only ASCII value that is stored in the method GSTRegNumber in the company object.

One could say that the Dynamic attribute makes the table associated with a field a little more “open-minded”.

Normally, the relationship between a Field and its Table in TallyPrime is quite strict. When a table is associated with a field, the value accepted in that field must already exist as an item in the table. In other words, users can only select values that are part of the table list. If the entered value is not present in the table, the value does not get accepted in the field.

However, this behavior needed to evolve for practical business scenarios. Consider cases such as:

  • Entering a new Batch Name during Batch Allocations
  • Entering a new Tracking Number while recording voucher tracking details

In such situations, users may need to enter completely new values that are not yet part of the existing table. At the same time, the Field–Table relationship still needs to be maintained. This is where the Dynamic attribute comes into play.

The Dynamic attribute enables the table to accept and work with values that were not originally part of the table. It mainly performs the following functions:

  1. Dynamically adds specified strings as items to the table
  2. Ensures that if a value returned to the field is not already part of the table, it is automatically treated as a valid table item and accepted in the field

Needless to say, this attribute works only when a Table attribute is specified for the Field.

A major application of this attribute is in combination with Trigger and TriggerEx attributes. These attributes are often used to open an Auto Report where users can create or enter new names. Once the new value is returned to the field, it may not originally exist in the table. In such cases, the Dynamic attribute ensures that the returned value is accepted and becomes part of the table context.

In TallyPrime, Dynamic is predominantly used in two ways:

  1. Specifying Strings

Dynamic : $$SysName:EndOfList

This does two things:

  • Adds the system name EndOfList as an item in the table
  • Ensures that any value returned through Trigger or TriggerEx is accepted in the field and dynamically treated as part of the table
  1. Specifying Empty Quotes

Dynamic : “”

In this case:

  • No additional item is added to the table
  • However, any value returned through Trigger or TriggerEx is still accepted in the field and dynamically considered part of the table

Thus, the Dynamic attribute provides the flexibility needed for real-world data entry scenarios while still preserving the integrity of the Field–Table relationship.

Syntax

Dynamic: <Comma separated strings/expression>

<Comma separated strings/expression> The string values to be added dynamically in the table.

Example

[Field: TSPL Batch Name]

    Use       : NameField
Table     : Active Batches VchExtract, New Number
Show Table: Always
Set Always: Yes
Trigger   : New Number : $$IsSysNameEqual:NewNumber:$$EditData
Dynamic   : If ($$Line>1) then $$SysName:EndofList else “”

Explanation

The example shows a field TSPL Batch Name that displays a table of Batches and New number option specified via the attribute Table. When user selects New Number from the table, the auto report named New Number is opened in alter mode for the user to enter a new batch name, as specified by the Trigger attribute. As specified by the attribute Dynamic, from second line onwards the table shows EndOfList sysname in the table as well, and in all the lines when new batch name is returned by the trigger report it is made a part of the table. This shows how dynamically items can be made part of the field table.

Whether it is to draw attention to a field through highlighting or to improve readability by making important information visually stand out, the Background attribute can be a powerful design aid when used effectively. This attribute specifies the background color of a Field, helping create a clearer and more intuitive user experience.

For example, when a voucher is opened in TallyPrime, users can instantly identify the type of voucher they are working in because the Voucher Type field is displayed with a distinct background color. Such visual cues improve recognition and navigation without requiring the user to consciously search for information.

Beyond regular fields, the Background attribute also contributes to graphical representations in TallyPrime. When a Part is configured with:

  • Graph Type attribute set to Yes
  • Graph Style attribute set to Bar Graph

the Background attribute is used to determine the color of the bars displayed in the graph. This helps visually differentiate data and enhances the overall presentation of graphical information.

Syntax

Background: <Color Definition Name>

<Color Definition Name> is the name of the color definition or expression that evaluates to a color definition.

Example

[Field: TSPL Terms]

    Use       : NameField
Set as    : “Terms & Conditions”
Background: Red

Explanation

The example shows thaat the field TSPLTerms holds value “Terms & Conditions” shown with Background Red, as specified by the attribute Background.

A Border is a simple, yet powerful way to make your UI look clean, structured and visually appealing. Whether it is to underline the text, or box up the field content to show it’s a title or to separate it from neighboring fields, Border attribute can be used to achieve all the requirements.

Syntax

Border: <Border Definition Name>

<Border Definition Name> is the name of the border definition or expression that evaluates to a border definition

Example

[Field: TSPL Title Field]
Set as: “Consolidated Finances”
Border: TSPL Border

[Border: TSPL Border]
Bottom: Thick, Double Lined

Explanation

The example shows Border TSPL Border defined with Bottom Border Thick and double lined. The Field TSPL Title Field shows the text “Consolidated Finances” with a bottom border derived from the border definition TSPL Border set via the Border attribute. This gives an underlined effect to the text shown.

This attribute is used when you want your borders of the field to have depth while viewing in a 3D display.

Syntax

Border3D: <Logical Expression>

<Logical Expression> is a logical value or an expression that evaluates to a logical value

Example

[Field: TSPL Title Field]
Set as  : “Consolidated Finances”
Border  : TSPL Border
Border3D: Yes

[Border: TSPL Border]
Bottom: Thick, Double Lined

Explanation

The example shows Border TSPL Border defined with Bottom Border Thick and double lined. The Field TSPL Title Field shows the text “Consolidated Finances” with a bottom border derived from the border definition TSPL Border having a 3D effect set via the Border3D attribute. This gives a 3D underlined effect to the text shown.

The Bound attribute is used to define the minimum and maximum width that a column can occupy. It is especially useful in auto-columnar reports where columns are generated dynamically. By controlling the width range, this attribute ensures that each column maintains an appropriate size, preventing it from becoming either too narrow or excessively wide.

In other words, the Bound attribute:

  • Prevents column width from shrinking below the specified minimum limit
  • Prevents column width from expanding beyond the specified maximum limit
  • Ensures a cleaner and more structured report layout

If both Width and Bound attributes are specified, the Bound attribute takes precedence and overrides the Width setting.

Syntax

Bound: <Min Width Value>,<Max Width Value>

<Max Width Value> is the number that specifies the minimum width

<Min Width Value> is the number that specifies the minimum width

Example

[Field: TSPLAutoCol TB DrAmt Field]

    Use   : Amount Field
Style : Normal
Bound : 8, 14

Explanation

The example shows that the column width of the field TSPLAutoCol TB DrAmt Field will be minimum 8 and maximum 14, as specified by the attribute Bound.

 

Imagine a sturdy cupboard where one compartment is used only when guests arrive, while at other times it remains empty. Even when that compartment is unused, the overall structure of the cupboard stays intact, and the arrangement of the other compartments remains unaffected.

Similarly, in TallyPrime, there are situations where a field value needs to be shown only under certain conditions, while still preserving the layout and alignment of the report. This is achieved using the Inactive attribute.

When the condition specified in the Inactive attribute evaluates to true, the value of the field is suppressed and appears empty. However, the field continues to occupy its defined width and position within the layout. As a result, the structure of the report remains consistent and visually aligned, avoiding unnecessary shifting of neighbouring fields or columns.

In short, the Inactive attribute helps conditionally hide field content while preserving the overall report structure and formatting.

Syntax

Inactive: <Logical Expression>

<Logical Expression> is a logical value or a expression that evaluates to a logical value

Example

[Field: OptionalNarration]

   Set As  : “Narration Text”
Width   : 20
Inactive: $$IsSales:$VoucherTypeName

Explanation

The example shows a field TSPL Narration with text “Narration Text” occupies width of 20 characters. This Field content will be hidden while maintaining the same width when the voucher type is Sales. In other words the field content will be shown for any other voucher type other than sales. This shows how a simple attribute can be used to decide when any data or field should be enabled.

 

As the name suggests, the Case attribute defines the letter casing of text entered in a Field. Applicable only to String Fields, this attribute allows developers to control how text is displayed and entered — whether in UPPER CASE, lower case, or any other supported case format.

Whether you want text to appear prominent and formal using uppercase, or subtle and note-like using lowercase, the Case attribute provides that flexibility. Beyond simply defining the display format, it also supports toggling between the default case (as typed by the user) and the specified case format.

The actual toggling action is performed using the field action Field Toggle Case. By default, users can press Shift + F3 to toggle the case when toggle behavior is enabled.

For example:

  • If the field case is set to Upper Case
  • And the toggle condition is enabled

then pressing Shift + F3 allows the user to switch between:

  • the original typed case, and
  • the enforced uppercase format

TallyPrime also provides the function $$CaseConvert, which offers similar functionality programmatically by converting a given string into the specified case format.

Important Notes

  1. The Case attribute is applicable only to String Fields in either Edit Mode or Read-Only Mode.
  2. If the Field has a Storage attribute, the toggled state is also stored.
  3. If toggle behavior is disabled, the specified case setting will not be honoured.

Syntax

Case:<Case Keyword>:<Toggle Logical Expression>

<CaseKeyword> can be All Capital, Upper Case, All Lower, Lower Case, Small Case, First Upper Case, Title Case, TitleCaseExact, Normal, Proper Case, etc

<Toggle Logical Expression> is logical value or expression that evaluates to a logical value that controls whether the field case can be toggled or not. By default this is Yes.

All Capital / Upper Case Converts the input expression to upper case.
All Lower/Lower Case/Small Case Converts the input expression to lower case.
First Upper case Converts the first letter of the first word in a sentence to upper case. Other characters will remain as they are.
Title Case
  • Converts the input expression to Title case, i.e., the principal words should start with capital letters.
  • It will not convert the prepositions, articles or conjunctions, unless one is the first word.
  • It will ignore a subset of words from capitalization like the, an, and, at, by, to, in, of, for, on, cm, cms, mm, inch, inches, ft, x, dt, eis, dss, with, etc. For this subset of words, the original strings’ cases will be preserved.

 

Title Case Exact
  • Converts the input expression to Title case, i.e., the principal words will start with capital letters.
  • It will not convert the prepositions, articles or conjunctions, unless one is the first word.
  • It will ignore a subset of words from capitalization like the, an, and, at, by, to, in, of, for, on, cm, cms, mm, inch, inches, ft, x, dt, eis, dss, with, etc. This subset of words will be converted to small case.

 

Proper Case Converts the input expression to Title case, i.e., all the words in a sentence should start with capital letters.
Normal Preserves the input expression as it is

Example

[Field: TSPL Field]

   Use     : NameField
Case    : All Capital : Yes
Storage : Name

Explanation

This example shows that the case in the field TSPL Field is set to All capital in this field and the typed in value can be toggled from as typed to All Capital and vice versa, as specified by the Case attribute.

Whenever a report is exported in excel format from TallyPrime, by default each field data is displayed in one cell in the excel file. But when the data in the field is of larger length, you might want to fit the content in more than one excel cell in order to increase the readability of the content in the excel file.

For these scenarios, Cell attribute is used. Set the number of cells that the field data should occupy and viola! You have a neatly structured data in your output excel file.

Syntax

Cell: <Numerical Value>

<Numerical Value> is a number or expression that evaluates to a number

Example

[Field: TSPL LedgerName]

   Set as : $Name
Cell   : 3

Explanation

This example shows that the field TSPL LedgerName when exported in excel format, occupies 3 cells in the output Excel Sheet, as specified by the attribute Cell.

Color doesn’t just make something look aesthetically pleasing, but when smartly used, it can help the viewer understand what to see first. Applying the same to field data displayed in TallyPrime, by setting the right foreground color to the field data one can make the importance of data felt, even before one reads the information. Like in a voucher, while the ledger name is in black, the current balance of the ledger is in grey.

Whether it is to add some bling to your UI or to set importance to the data shown, the color attribute does it all.

Syntax

Color : <Color Name>

<Color Name> is the name of the color definition

Example

[Field: TSPL Blue Field]

   Set as : “Field Value”
Color  : Blue

Explanation

The example shows the field TSPL Blue Field with text ‘Field value’ is shown in Blue Color.

When you set ‘Common Table: Yes‘, TallyPrime becomes smart about memory usage, specifically when the field is part of the repeated line. Instead of creating a fresh copy of the table for every field, it reuses the same memory space across all instances. This means faster performance and significantly less memory consumption, making your customization both efficient and lightweight!

Ever wondered why you can select multiple ledgers in a voucher fast? This is why! Every UI in tally where same table is used in repeated fields uses the Common Table attribute.

Syntax

Common Table : <Logical Expression>

<Logical Expression> is a logical value or an expression that evaluates to a logical value

Example

[Part: TSPL Ledgers]
Line     : TSPL Ledgers
Repeat   : TSPL Ledgers
Break On : $$IsEndOfList:#TSPLLedgers

[Line: TSPL Ledgers]
Field: TSPL Ledgers

[Field : TSPL Ledgers]
Table       : Ledger, EndOfList
Common Table: Yes

Explanation

This example shows a field TSPL Ledgers part of line TSPL Ledgers which repeats in the part. With the specification of Common Table:Yes in the field, same table is reused across all instances of the field to save memory and improve performance.

Think of this attribute as your field’s personal alert system! When a user enters an invalid value (based on your condition), it instantly pops up a message box showing the message you’ve defined—helping users correct their input right away. It’s a smart way to guide users and avoid mistakes!

Ever tried creating a ledger that already exists, and couldn’t do it because you kept getting duplicate entry message? The Control is the attribute that makes it happen.

When all the attributes Control, Validate and Notify are mentioned in the field, the order of evaluation will be,

  1. Control
  2. Validate
  3. Notify

When one of them gets executed in the order of evaluation, the others are ignored.

Syntax

Control: <System Formula Name> : <Logical Condition>

<System Formula> is the system formula name which holds the message to be displayed in the message box when the condition is satisfied

<logical Condition> is a expression that evaluates to a logical value

Example

[Field: TSPL Discount ]
Use     : Number Field
Control : TSPLDiscMsg: ($$Value < 2 OR $$Value > 10)

[System: Formula]
TSPLDiscMsg: “Invalid Discount! Enter any Number between 2 and 10”

Explanation

This example shows a field TSPL Discount, which takes data input of type Number as specified by the Use attribute. As specified by the Control attribute, the valid value of this field is between 2 and 10 only. When the entered value is less than 2 or more than 10, the field validation fails with a message box ‘Invalid Discount! Enter any Number between 2 and 10’ and user is not allowed to move on from the field, until a valid value is entered.

 

While a flat list Table is simple and nice for selection, it might not be the ideal design in all the scenarios. Imagine having to copy paste file paths all the time, versus having the luxury of browsing through the folders and selecting the path in the product itself.

This is where this attribute plays a role in indicating to the system that the table shown in this field is not a flat table, but a cyclic one. i.e. when ‘Process Change Table’ is set to yes, the cursor stays in the same field and based on the selection of the table item, re-populates the table with updated values.

This is how the cyclic table in a field is achieved

  1. Initial Table: The ‘Table’ attribute of the field which takes collection names provides the initial list of items to be shown in the table associated with the field.
  2. Indicating Refresh of Table: Process Change Table: Yes is specified, the cursor stays in the same field and based on the selection of the table item, re-populates the table with updated values.
  3. ‘Act on Table element’ attribute: While the above attribute only indicates that refresh needs to happen, the indication of whether current table(current collections shown) needs to be refreshed or a new table(New collection) needs to be shown is indicated via ‘Act on Table element’ attribute of the field
  4. ‘Execute Obj Actions’ action & ‘Change Table’ action: ‘Act on Table element’ attribute is used to change any variable is required and is used to call an action in Object definition via ‘Execute Obj Actions’ . The action attribute specified in the object calls the action ‘Change Table’ with the indication whether it is the current table itself that needs to be repopulated or specified the name of the collection that needs to be shown as the table
  5. Breaking the Cyclic Behavior: This process keeps happening until the required value is selected in the field, in other sense when ‘Act on Table element’ statements fail to execute.

Syntax

Process Change Table : <Logical Value>

<Logical Value> can be Yes or No.

Example

[Field: TSPLChange Table]
Use                  : Name Field
Table                : TSPLList of Stock Group
Show Table           : Always and Never Hide
Act On Table Element : Yes : Execute Obj Actions: TSPLChildStockItem
Process Change Table : Yes

[Collection: TSPLList of Stock Group]
Title : “List of Stock Group”
Type  : Stock Group
Format: $Name,20
Align : Center

[#Object: Stock Group]
Action : TSPLChildStockItem: Set: TSPLStkGroupName: $$CurrentTableObj:$Name
Action : TSPLChildStockItem: Change Table: TSPLChildStockItemCollection

[Collection: TSPLChildStockItemCollection]
Title    : “Stock Item of ” + ##TSPLStkGroupName
Type     : Stock Item
Child Of : ##TSPLStkGroupName
Align    : Center
Format   : $Name,25

[System: Variable]
TSPLStkGroupName : “”

[Variable: TSPLStkGroupName]
Type : String

Explanation

In this example,

  1. The field TSPLChange Table initially shows list of stock groups for selection via the Table attribute of field with collection TSPLList of Stock Group
  2. Process Change Table: Yes is specified to indicate Table needs to be refreshed
  3. Act on Table element gets executed as soon as a Stock group is selected, calling the action Execute Obj Actions that executes the object action specified with label TSPLChildStockItem one after the other.
  4. In the action attribute of the modified stock group definition, TSPLStkGroupName variable is set with the selected stock group. Another action attribute calls action ‘Change table’ that specifies a new collection ‘TSPLChildStockItemCollection’ where the variable is used to populate stockitems of selected Stock group. This collection is used to repopulate the values shown in the table associated with the field.

Once a stock item is selected, the ‘act on table element’ attribute fails to execute as there is no action attribute specified in the Stock Item Object definition with label TSPLChildStockItem

Think of this as guiding the cursor to the right place in a list. This attribute lets you control where the cursor lands within a table linked to the field. If no specific condition is given, it smartly defaults to the very first item—helping users start from the top with ease. However, this depends on the attributes SkipSysName and SkipActions. Needless to say, this attribute works in combination with the Table attribute of the field.

Some Default Table Item behaviors:

  1. When Default Table Item is not given or the none of table items satisfies the condition and SkipActions : yes is specified then the cursor is placed on the first item after the action item depending on SkipSysName if provided.
  2. The Table gives an overview of how SkipSysName affects Default Table Item.
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.

Syntax

Default Table Item : <Logical Expression>

<Logical Expression> is the condition based on which the item in the table is considered as default item

Example

[Field: TSPL Stock Item]

     Use               : NameField
Table             : List of ExtractStockItems, Create Master: $$Line = 1
Table             : List of ExtractStockItems, EndofList, Create Master
Unique            : Yes
Default Table Item: If $$Line > 1 Then $$IsSysNameEqual:EndofList:$Name Else NOT $$IsSysName:$Name

Explanation

In this example the field TSPL Stock Item is part of a repeated line. This field shows a table with Stockitem list and Create master  when the line number is 1 and shows a table along with EndofList for line numbers more than 1, as specified by the Table attribute. With the specification of the Default Table Item attribute, when the line cursor is on line number 1, the table cursor will be on the table item which is not a sysname, in other words on the first stockitem name and when the line cursor is on line numbers more than 1,  then the table cursor will be set on EndofList by default. This makes the selection of items from the table much easier and guided.

Have you experienced how every report can be drilled down to the last level? This is one of the important attributes that make all the drilldown reports possible. The Display attribute lets you define which report should open in Display mode when the Enter key is pressed on a line—based on a condition you set. It’s a smooth way to link actions with insights!

Note that to achieve a smooth drilldown Field level Variable attribute should be mentioned and the same variable is linked with the Display Report via Report level Variable attribute and the variable value is used in the collection of the display report to show the data relevant to field value from where the display report was opened.

Syntax

Display : <Report Name>: <Logical condition>

<Report Name> is the report that needs to be opened in display mode

<Logical condition> Condition that determines whether the report should be opened in display mode or not

Example

[Field : My TB Name]
Width   : 120 mms
Set as  : $Name
Variable: GroupVar
Display : My Trial Balance : $$IsGroup

[Variable : Group Var]
Type     : String
Default  : “”
Volatile : Yes

[Report : My Trial Balance]
Form     : My Trial Balance
Variable : GroupVar

[Collection : My Collection]
Type     : Group
Child of : ##GroupVar

Explanation

The above code snippet demonstrates the Drill down action, which is based on the Group Name displayed in the field. The Drill down action is achieved by specifying the two attributes Variable and Display at the field level. A Variable is defined as Volatile and is associated at Report. The attribute Variable of Report definition is used to associate the Variable with the report. The same Variable is used in the Childof attribute of the Collection definition. When a line is repeated over this collection in the report; when the user presses the Enter key, the Report being displayed will have the objects whose Parent Name is stored in the variable.

Planning to print using a Dot Matrix printer? The attribute DMPMode attribute lets you specify which Dot Matrix mode to use during printing. It kicks in only when Dot Matrix printing is active, and simply steps aside for other printing types.

Note that, the same attribute is available in Form, Part and line level, and specifying this attribute at field level, overrides attribute for the specific field, if specified in other levels.

Syntax

DMPMode : <DMP Printing Mode>

<DMP Printing Mode>: Here the values allowed under this are: ‘Normal’, ‘Bold’, ‘Italics’, ‘Underline’, ‘Condensed’, ‘Enlarged’, ‘DoubleLine’

Example

[Field : TSPL BillHeader]

   DMPMode : Draft

Explanation

In this example, the Field TSPL Bill Header specifies the Dot Matrix Print mode as “Draft” when using DMP printers, via the attribute DMPMode.

Use the attribute Excel Formula to insert a custom Excel formula directly into the cell during excel export of any report in TallyPrime — making your spreadsheets smarter and more dynamic right from TallyPrime! This reduces the effort and time taken to get your excel data in the right format as you need not insert the formula separately after you get excel output, instead its already present and the data is evaluated as per it.

Syntax

Excel Formula : <Excel Formula>

<Excel Formula>: Expression that evaluates to a excel formula that is inserted in the cell corresponding to the field

Example

[Field: TSPL Result]

   Use           : Amount Field
Excel Formula : “=B92-B94”

Explanation

In this example, when the report the field TSPL Result belongs to is exported in excel format, the cell corresponding to the field in excel export will have the value resultant of the given formula “=B92-B94” (i.e. the result of subtraction of value in B94 cell from the value in B92 cell), as specified by the attribute Excel Formula.

This attribute is useful when writing remote compliant TDLs. In a client/server environment, data resides in the server. A typical client will have only user interface. Whenever the client requires data, it must send a request to the server with credentials, and the server will respond with the data. In other words, Tally client will have only Interface Objects locally and the Data Objects need to be fetched from the server on request.

When multiple methods of a Single Object/Multiple Objects of the same type are required, then that Object can be fetched at Report, Form, Field and Function levels. For this purpose, Field attribute Fetch Object is used. Internally fetching an object will generate an XML fragment which will be sent to the Tally Server as a request.

This attribute is used to Fetch Object values dynamically based on current field values. For example, the field may be associated with a Table of ledgers. Based on the ledger selected, the corresponding methods of the Object require to be fetched. In such cases, this attribute will be useful.

Syntax

Fetch Object : <Object Type> : <Expression> : <List of methods>

<Object Type> denotes the type of the Object like Group, Ledger and so on.

<Expression> can be any of the string expression that evaluates to the name of the object of the specified Object Type from which the methods need to be fetched.

<List of methods>List of methods to be fetched from the Object.

Example

[Field : TSPL Smp Field Level FO]

     Use : Name Field
Table : TSPL Smp LedgersList
Set As : “Sales @ 12.5%”
Show Table : Always
Variable : TSPL Smp LedName
Modifies : TSPL Smp LedName : Yes
Fetch Object: Ledger : $$Value: TaxClassificationName
TaxClassName: ($TaxClassificationName:Ledger:$$Value)
Fetch Object: TaxClassification: @TaxClassName: Name, ClassificationFromDate, ClassificationToDate, RateofVAT, TaxType

Explanation

In this example, the field TSPL Smp Field Level FO has a table that lists the list of ledgers as specified by the Table attribute. Once a ledger is selected from the table in the field, the field value which is the ledger name is obtained in the function $$Value. Using this, the attribute Fetch Object fetches the method TaxClassificationName from the Ledger selected in the field. Further, using this taxclassificationname, the methods ClassificationFromDate, ClassificationToDate, RateofVAT, TaxType are fetched from the TaxClassification object.

“This is an Important Update” . The eye catches the word ‘important’ first isn’t it!

Want to make key info pop like this? This attribute lets you highlight specific words in a field using a defined style, making important details stand out instantly! The search capability in TallyPrime uses this attribute to highlight what was searched for while showing the results. Just make sure the text given to be highlighted is actually a part of the field data!

Syntax

FG Highlight : <String Expression> : <Style Name>: <Color Name>

<String Expression> is the expression that evaluates to a string that needs to be highlighted in the text displayed in the field.

<Style Name> is the style definition to be used for the highlight.

<Color Name> is the color definition to be used for the highlight

Example

[Field: TSPL ImportantUpdate]

Use : Name Field
Set as : “Important Update”
Style : Small
FGHighlight : “Important” : Small Bold : Black

Explanation

In this example, the field TSPL ImportantUpdate displays the text Important update with ‘Important’ in black color and small bold, as specified by attribute set as and FGHighlight.

The attribute Field is used to create fields containing one or more fields, like Group fields. We can create multiple fields inside a single field, using the Fields attribute. The attribute Fields is useful when multiple Fields are required to be repeated in a Line. For example, in case of a Trial Balance, two Fields, i.e., Debits and Credits, are required to be repeated together if a new column is added by a user. The new column thus added, should again contain both these fields, i.e., Debit and Credit. In a Line Definition, only one Field can be repeated. So, a Field is required within a Field if more than one field requires to be repeated.

Do read on creating columnar, auto columnar and automatic auto columnar reports where this is used.

Syntax

Field : <Field Definition Name>, <Field Definition Name>, …

Example

[Line: TSPL AutoCol TB Details]
Fields : TSPL AutoCol TB Name Field, TSPL AutoCol TB Amount Field
Repeat : TSPL AutoCol TB Amount Field

[Field: TSPL AutoCol TB Amount Field]
Fields : TSPL AutoCol TB DrAmt Field, TSPL AutoCol TB CrAmt Field
Border : Thin Left

[Field: TSPL AutoCol TB DrAmt Field]

    Use   : Amount Field
Style : Normal

[Field: TSPL AutoCol TB CrAmt Field]

    Use   : Amount Field
Style : Normal

Explanation

In this example, the fields TSPL AutoCol TB DrAmt Field and TSPL AutoCol TB CrAmt Field are the sub fields within the main field TSPL AutoCol TB Amount Field specified via the attribute Field . The main field is repeated in the line to be able to add new columns in case of  auto columnar Trial balance report.

Have you noticed how, in an Excel sheet with multiple columns, certain columns can be frozen so they remain visible while you scroll through the rest of the data? This helps maintain context and makes large datasets easier to navigate.

A similar experience is available in TallyPrime reports as well. In reports containing repeated fields or multiple columns, specific fields, typically the first column, can remain fixed while users scroll through the remaining columns. Since the cursor does not move into these fixed fields, they continue to provide a constant reference point, making the report easier to read and navigate without losing context.

This is the magic of the attribute Fixed. Based on the condition given it makes the field fixed making sure its not a part of the scrollable family when the cursor moves to the next page on the screen. The scroll on the fields is achieved with the Scroll attribute in field level.

Syntax

Fixed: <Logical Condition>

<Logical Condition> is logical value of expression that evaluates to a logical value

Example

[Field: TSPL StockItem field]

   Use    : NameField
Set as : $Name
Fixed  : Yes

Explanation

The example shows that field TSPL StockItem field which is the first column showing the stockitem name will remain fixed even when the cursor scrolls over to next page while displaying the other columns corresponding to each stockitem. This is achieved by using the attribute Fixed.

Whether it is to show amount value with or without commas or to show discount value in percentage, this is the attribute that gives you the field content in the format you need it to be. Tightly coupled with the primary data type of the field specified with the Type attribute, while the type attribute determines the data type of the value the field holds, Format attribute provides list of formats which can be used to represent the field value.

To read more on Data Types and Format, click on What are Data Types, Operators, and Expressions in TDL? | TallyHelp

Syntax

Format : <List of Formats>

<List of Formats> is comma separated list of formats applicable for the primary data type

Example

[Field: TSPL Qty]

    Use   : Qty Primary Field

    Set As: $ClosingBalance

    Format: “Tail Units:” + “kgs”

Explanation

The example shows a field TSPL Qty that displays data of type Quantity.

Let’s consider an example where, the unit of measure used for a Stock item is Bag of 10kgs of 1000 gms and the closing balance is 12-5-250 bags. In a field, we may require to retrieve the value in kgs or gms instead on bags. With the above code, the following is possible.

  • If Format is “Tail Units:kgs”, value returned is 125 kgs 250 gms=12X10 kgs+5kgs & 250 gms.
  • If the Format is “Tail Units:gms”, the value returned would be 125250 gms = 12X10X1000 gms+ 5X1000 gms +250 gms.

The Fullwidth attribute decides if the field should expand and fill up the remaining space on the line – perfect for creating balanced layouts without empty gaps.

Have you noticed how reports in TallyPrime appear so clean, balanced, and easy to read? One of the attributes contributing to this experience is FullWidth. The FullWidth attribute is primarily used in fields that display names of masters or other lengthy text values. It ensures that the field expands to occupy the available width, allowing the complete content to remain visible and legible, regardless of how long the name is.

Syntax

FullWidth:<Logical Condition>

<Logical Condition> is logical value of expression that evaluates to a logical value

Example

[Line: TSPL StockInfo]

    Field      : TSPL StockItem Field
Right Field: Amount Field
Local      : Field : Amount Field: set as : $ClosingValue

[Field: TSPL StockItem Field]

    Use      : NameField
Set as   : $Name
Fullwidth: Yes

Explanation

The example shows that Line TSPLStockInfo has left field TSPL StockItem Field and right field Amount Field.  The field TSPL StockItem Field showing the stock item name occupies the rest of the width remaining in the line after allotting the space to the amount field.

Have you seen those Graphs in Monthly summary reports, in Dashboard reports that show off the data through the elegant graphs? Number of attributes comes together to make that happen and the attribute Graph Label attribute is one of them.

This attribute defines whether the field’s value will appear as the label on the graph’s x-axis — helping you turn data into visually meaningful stories. Make sure the corresponding part is marked to display graph data using the Graph Type, Graph Style , Display X Axis Legend attribute, for this attribute to have an effect.

Syntax

Graph Label : <Logical Condition >

<Logical Condition> is logical value of expression that evaluates to a logical value

Example

[Field: TSPL Graph]

   Use         : Name Field

   Set as      : $Name

   Graph Label : Yes

Explanation

The example shows that the field TSPL Graph has the attribute Graph Label set to yes, which marks the field value to be used as a label on the x-axis of a graph.

To design a precise and meaningful graph like shown in monthly reports and dashboard report, the attribute Graph Value plays the core role, as this is the attribute when set to yes, the system uses the field value to plot the graph along x axis.

Make sure the corresponding part is marked to display graph data using the Graph Type, Graph Style , Display X Axis Legend attribute, for this attribute to have an effect.

Syntax

Graph Value : <Logical Condition>

<Logical Condition> is logical value of expression that evaluates to a logical value

Example

[Field: TSPL Graph value]

   Use         : Amount Field
Style       : Large Bold
Set as      : $Closingbalance
Graph Value : Yes
Background  : First BarGraph Color
Graph X Axis Legend Title: “Closing Balance”

Explanation

The example shows that the field TSPL Graph value with the attribute Graph Value set to yes, marks the field value to be used as a value on the x-axis of a graph.

Have you seen the number of graphs in the Dashboard report in TallyPrime? Eventhough there are many graphs you can easily tell which graph represents what information! And that credit goes to this attribute that gives your graph a title!

The attribute Graph X Axis Legend Tile lets you set a custom title for the x-axis legend of your graph. If you don’t set one, it’ll smartly use the field’s definition name by default.

Make sure the corresponding part is marked to display graph data using the Graph Type, Graph Style , Display X Axis Legend attribute, for this attribute to have an effect.

Syntax

Graph X Axis Legend Title : <String Expression>

<String Expression> is the expression that evaluates to a string

Example

[Field: TSPL Graph value]

    Use         : Amount Field
Style       : Large Bold
Set as      : $Closingbalance
Graph Value : Yes
Background  : First BarGraph Color
Graph X Axis Legend Title: “Closing Balance”

Explanation

The example shows that the field TSPL Graph value specified with the attribute Graph X Axis Legend Title, makes “Closing balance” appear as the x axis legend title.

This attribute lets you add some smart spacing to your field when you need the actual field width to start after leaving out some space in the left so that it looks more neat and the indent might imply the level of information shown. The attribute Indent lets you control how much each field should be indented from its starting point.

This attribute is like the Space Left attribute, except that it indents the field independent of width of the field. Space Left indents the field within the width available. However, the attribute Indent indents the field exclusive of the width.

Syntax

Indent: <Measurement Formula>

<Measurement Formula> is the formula that evaluates to a number that indicates the number of characters

Example

[Field: TSPL Field]

    Set as : “Field Value”
Width  : 20
Indent : 4

Explanation

The field TSPL Field displays the text Field Value after 4 characters of indentation, as specified by the Indent attribute.

Whether it is a display report or a report that takes user input, titles and prompts makes the report understandable and usable. The attribute Info makes it easier to display titles and prompts in the field especially when there are editable fields in the report and you do not want the cursor to go to the field. This attribute sets the given value to the field and makes the field read only and also skips it, making it very clear to the user which are the titles and prompts and which are the fields where user input in required.

If a field has both info and set as mentioned, info takes the priority.

Syntax

Info : <String Expression>

<String Expression> is string or expression that evaluates to a string to be displayed

Example

[Field: TSPL Title Field]

    Info  : “Particulars”
Width : 20

Explanation

The field TSPL Title Field displays the text Particulars which is non editable specified via the attribute Info.

Who doesn’t want to be invisible and experience the power of freedom? The Invisible attribute gives that power. It lets you control the visibility of a field — it stays hidden until the condition you specify is met. The application of this attribute are many. It helps you design screens to show only basic data and show the rest based only when the user chooses to see the advanced data. So, until then the advanced data stays invisible. In most of the configuration screens and reports you can see this functionality.

For a programmer this attribute is a boon in storing values that need not be shown to the user. For example, the master id field in all the objects is invisible and it stores the master id of the object.

Syntax

Invisible: <Logical Condition>

<Logical Condition> is the condition that needs to be met to make the field invisible

Example

[Field: TSPL Phone Name]

   Use : Name Field
Set as : If $$InCreateMode Then #PhoneNumCountryCode + #PhoneNumber Else $Name
Storage : Name
Set Always : Yes
Invisible : Yes

Explanation

The example shows a field TSPL Phone Name where the field is made invisible via the Invisible attribute to store the value mentioned in the attribute set as, that shouldn’t be shown to the user.

Interaction with the UI becomes so much cleaner and intentional when utmost care is taken to design it to the T. When there is a selection of item from a table involved, its only logical that the table pops up when one reaches the field. But when the design is delicately handled, even determining at what point the table should pop up in the field, makes a world of difference. The table attribute makes it possible to specify the same using the Interaction keywords.

Make sure to use this attribute in the field along with the ‘Table’ attribute, because if there is no Table, there is no Show Table!

Syntax

Show Table : <Interaction Keyword>

<Interaction Keyword> Permissible Values are Always,On Error,On First Key,Never, On Blank, On Empty, Always and Never Hide & Default

Always: The table appears as soon as cursor goes to the field. Example: Part Name selection in a voucher

On Error: The Table appears on error, i.e. when entered value is not part of the Table. Example: All the yes/No table in configuration

On first Key: The Table appears when user enters a key. Example: StockItem selection in voucher

Never: The value entered should be a part of the table, but the table doesn’t appear

Default: Same as on first key

On Blank/On Empty: Table appears when field is blank or empty

Always and Never Hide: Table is shown always ignoring the key that allows hiding the table (Alt+T, that calls action ‘Field Table Mode’)

Example

[Field: TSPL Ledger]

   Use       : NameField
Table     : Ledger
Show Table: Always

Explanation

The example shows that the field TSPL Ledger which shows the table with the list of ledgers as specified by the attribute Table. The table appears as soon as cursor goes to the field, as specified by the attribute Show Table.

When you want to integrate any third-party solution with TallyPrime, you can send the data in a defined structure in JSON or XML Format by using the Report construct. The attribute XML Tag alias JSON Tag specifies the tag name under the UI definitions, Form, Part, Line, and Field. You can use this attribute to provide the tag name for the elements in the report sent as XML or JSON payload over http or to create the structure of the data in JSON file.  XML Tag and JSON Tag are aliases of each other. i.e. specify any of them in the Field and it will impact both XML and JSON output of the Report

Syntax

[Form/Part/Line/Field: <Definition Name>]
JSON Tag : <String Expression>
[Form/Part/Line/Field: <Definition Name>]
XML Tag : <String Expression>

<Definition Name> – the name of the definition.

String Expression> – any expression which evaluates to a string.

Variations of Attribute behaviour

  1. XML Output of the Report: When this attribute is not specified at the field level, by default definition name acts as a tag name. For Form/Part/Line, no tag corresponding to them will be exported.
  2. JSON Output of the Report when HTTP JSON or HTTPJSONEx or SVExportFormat is set to JSON or JSONEx: When this attribute is not specified at the field level, by default definition name acts as a tag name.

Example

[Field: TSPL Led Name]

   Use     : Name Field
Set as  : $Name
XML Tag : “Ledger Name”

Explanation

When the report to which the field TSPL Led Name is exported in JSON /XML format, the tag corresponding to this field will be ledger name as specified by the atrribute XML tag

This attribute exercises one of the superpowers of TallyPrime which is its multilingual functionality. Helping users key in data in their comfortable language, makes the product more versatile in nature. And this attribute helps you set a keyboard language to be used for a field. Whether it is to restrict user to input only in a specific language or to aid entering data in comfortable language, this attribute is your friend. You can see its application in TallyPrime in regional tax related screens where input language should be in a specific language and in fields like password or GSTIN where only English language can be used.

Each language an internally mapped language id in TallyPrime and this attribute takes the id as the parameter.

To find the id, just search the default TDL code for system formulas that ends with language id, there are readily available system formulas that are already mapped to the language id and all you have to do is use them directly.

Syntax

KbLanguage: < Expression for id>

< Expression for id> is language is or expression that evaluates to a language id

Example

[Field: TSPL Input Field]

   Use        : Short Name Field
Set Always : Yes
KBLanguage : @@HindiLanguageId

Explanation

The example defines a Field TSPL Input Field where the keyboard language is set to Hindi via the attribute KBLanguage which is set with a language id using the value set to the system formula HindiLanguageId. Which means that user can key in data in Hindi in this field.

Can you imagine the UI you are designing just looks simple from the outside but has hidden powers? The Key attribute makes this possible by associating keys to the field and actions to the key. Like the ledger and item field where when you press Alt+C the creation screen opens. Here you can create the item and after creation the context comes back to the voucher where the item is automatically selected already.   You can use this attribute to make your UI more powerful than it looks. And to make it more powerful, same field can have multiple keys associated with it.

Syntax

Key: < Key Definition Name>

<Key Definition Name> is the name of the key definition to be associated with the field

Example

[Field: TSPL Stock Group Name]

   Use        : Name Field
Table      : Stock Group Summary, Create Master
Show Table : Always
Key        : TSPL Create Stock Group

[Key: TSPL Create Stock Group]
Key     : Alt+C

   Action  : Create : Stock Group

Explanation

In this example, the field TSPL Stock Group Name displays of stock groups for selection as specified by the ‘table’ attribute. When user presses Alt+C in this field, stock group creation screen opens. This is possible because of the association of the Key TSPL Create Stock Group with the field via the Key attribute. As specified in the key definition, when Alt+C key is pressed the action statement that specifies to open the report Stock Group in create mode, gets executed

This attribute lets your field display multiple lines of text instead of just one — perfect when a single line isn’t enough! Very useful when large content is displayed in a single field. Have you observed the voucher narration field? The field has multiple lines making it easy to enter larger narration.

Some notes:

  • Mention Lines:0 in a display field to get text wrapping effect where the field data runs over as many lines as required to show the data. This doesn’t work in a edit field.
  • When the data of the field is more than the Lines mentioned
    • Display field: For example, If lines:2 is mentioned and the data runs more than 2 lines, only the data that fits first 2 lines is shown
    • Edit Field: For example, if lines:2 is mentioned and data runs more than 2 lines, the field show 2 lines at a time, but user can scroll through the field to see rest of the data.

Syntax

Line: <Number expression>

<Number Expression> is a number or expression that evaluates to a number

Example

[Field: TSPL Narration]

   Use     : Voucher Narration Field
Lines   : 4
Storage : Narration
Width   : 50% Screen

 Color   : Red

Explanation

The example shows that the field TSPL Narration is set with Lines:4, which means that the field will show 4 lines.

This attribute is a wonderful code organizer that helps you to read and analyse code better. This has no end user implication, but it sure is a developer’s friend.

A field houses so many attributes, and each can have complex expressions. Using this attribute, one can assign a meaningful label to the expression and use the label to access the expression instead. Makes the code look clean and helps reuse the same label across attributes if need be. And this label which is called a local formula can be used only locally in the context of the current field where it is defined its value is accessed with @ symbol.

Note that its advised having labels that don’t match with any attribute names just to avoid confusion.

Syntax

Local Formula : <Formula Name/Label> : <Expression>
OR
<Formula Name/Label> : <Expression>

<Formula Name/Label>: is a user defined name

<Expression>: Any expression that the local formula needs to be assigned

Example

[Field: TSPL Field]

   Use       : Name Field
Set as    : $Name
Background: @BGColor
BGColor   : If $$IsGroup then Yellow else Blue

Explanation

The Field TSPL Field is used to display group and Ledger names where background is set to yellow for group object and blue for ledger object. This condition is specified in the local formula BGColor.

This attribute lets you control how many characters a user can type into the field — from zero up to a max of 972, ensuring just the right amount of input every time. This is especially useful for the fields that take very specific number of characters like GSTIN number.

Syntax

Max: <Numerical Expression>

<Numerical Expression> is the number indicating the number of characters in the field.

Example

[Field: TSPL Phone Number]

   Type: Number
Max : 10

Explanation

The example shows that the field TSPL Phone Number of data type Number accepts maximum of 10 digits in the field as specified by the attribute Max.

Have you witnessed how anything you configure in the configuration screen changes the appearance of data on another screen? That’s the magic of variables when their values are set with the attribute Modifies in the field. This attribute sets the value of the given variable to either the field value or any given expression on acceptance of the field or acceptance of the form. This results in having the power to set the value of a variable to any value that can be further used for calculations or concatenation or produce configurable reports.

Syntax

Modifies: <Variable Name>[:<Logical Value>[: <expression>]]

<Variable Name> is the name of the variable.

<Logical Value> is any expression which evaluates to a logical value. Specifying Yes will modify the variable value as soon as the field gets accepted. No will update once the form is accepted.

<Expression> can be used to modify the variable value within the field.

Example

[Field : TSPLBatchesInGodown]

   Use      : NameField
Modifies : DSPGodownName : Yes : ##DSPGodownName + “– Godown”

Explanation

The example shows that as soon as the field TSPLBatchesInGodown is accepted, the value of the variable DSPGodownName is set to Godown name concatenated with string -Godown, as specified by the attribute Modifies.

 

There are times when you want to just give a warning message saying hey if you go on with this input, you might end up in trouble, giving the choice to the user to make an informed decision. That’s what this attribute Notify does. It flashes a warning message and if user chooses to continue, the cursor moves to the subsequent field.

Have you witnessed how gracefully you get informed about negative stock when entering a voucher? All made possible by this attribute.

A system becomes reliable when it’s built with strong validations and checks giving the user a sense of safety. And the Notify attribute plays its part in that.

When all the attributes Control, Validate and Notify are mentioned in the field, the order of evaluation will be in the order mentioned here. When one of them gets executed in the order of evaluation, the others are ignored.

Syntax

Notify : <System Formula> : <Logical Condition>

<System Formula>: System Formula that holds the message that needs to be displayed

<Logical Condition> The condition that needs to be met for the message to be displayed

Example

[Field: TSPL Email]

  Use    : NameField
Notify : ValidEmailAddress : NOT @@IsValidEmailAddress

[System: Formula]

  IsValidEmailAddress : $$IsValidEMail:$$Value
ValidEmailAddress   : $$LocaleString:”Enter a valid e-mail Address”

Explanation

The example shows a field TSPL Email, where the value entered is validated against the condition NOT @@IsValidEmailAddress provided in the Notify attribute, which checks if the entered value is not a valid email id. If the condition satisfies, i.e. if the entered value is not a valid email id, then the Message “Enter a valid e-mail Address” will be shown as specified by the first value passed in the Notify attribute via the system formula ValidEmailAddress . User can however dismiss the message and move on or choose to enter a valid email id.

This attribute is like a secret box where a lot of work goes on but for a user it just feels like a simple field interaction. Be it to set a variable when cursor focuses on the field or call a function to update certain values when is field is accepted or rejected, this attribute does it all. The ON attribute lets you define a list of actions that should automatically run when a specific event takes place — making your application smarter and more responsive.

Syntax

On: <Event>: <Logical Condition>:<Action>

<Event> The event keyword that acts as a trigger for the action to take place

<Logical Condition> : Condition on which needs to be satisfied along with the event for the action to take place

<Action> The action that needs to be executed

Example

[Field: TSPL field]
Use : NameField
On  : focus : Yes : Set : vOrigValue : If $$Isempty:##vOrigValue then $$Value else ##vOrigValue
[Variable: vOrigValue]

  Type : String

Explanation

The example shows a field TSPL field where when the cursor focuses on the field, The variable vOrigValue is set with the field value if the variable value is empty.

This attribute gives the power to choose multiple paths when the condition for each path is satisfied. This attribute is used extensively in TallyPrime to define properties of the field based on a condition and to top it off, multiple option statements can be defined for the same field. Evaluates the conditions for all the options provided in the description code and applies all the option statements which satisfy the evaluation conditions. For example, let’s say if a certain condition satisfies, the field font should be in red colour, when another condition satisfies the field font should be in Bold. At a point when both the condition gets satisfied you will get a Red coloured Bold font for the field.

Note that the field definition mentioned in the option statement should be defined with the modifier ‘!’ to indicate it is a optional field.

Syntax

Option : <Optional Field Name> : <Logical Condition>

<Option Field Name> is the field definition where the attributes given gets applied to the original field when the condition is satisfied

<Logical Condition> is a logical value or an expression that evaluates to a logical value

Example

[Field: TSPL Date]

   Set as : ##SvCurrentDate
Option : TSPL Field Color : ##FieldColorChange
Option : TSPL Field Font : ##FieldFontChange

[!Field: TSPL Field Color]

   Background : Red

[!Field: TSPL Field Font]

   Style : Small Bold

Explanation

The field TSPL Date has 2 option statements. The first statement depends on the value of the variable FieldColorChange, and when the value is true, the background color of the field is set as Red via the optional field FieldColorChange.  The second statement depends on the value of the variable FieldFontChange, and when the value is true, the font style of the field value is set as Small Bold via the optional field TSPL Field Font.  Both the option statements will be evaluated.

When you are printing a report or an invoice on a preprinted stationary, it is important to mention which are the content that is already printed in the paper and hence they need to be omitted from printing, so that the print on the paper is neat and clean. That is what this attribute does.  When the Preprinted attribute is set to YES, the contents of the current Field will be left blank assuming the same to be pre-printed.

This attributes work in conjunction with ‘preprinted/ plain’ button in the Print Configuration screen, which sets the variable SVPreprinted to yes informing the system that print is going to happen on a pre printed paper.

Syntax

Preprinted : <Logical Condition>

<Logical Condition> is a logical value or an expression that evaluates to a logical value

Example

[Field : TSPL Company Name]
Set as            : ##SVCurrentCompany
Full Width        : yes
Border            : Thin Bottom
Preprinted        : Yes
Preprinted Border : yes

Explanation

The example shows a Field : TSPL Company Name, which displays the company name. With the attributes Preprinted  and Preprinted Border set to Yes, the company name is omitted from printing and so is the border thin bottom. But the space occupied by the field content and border is left blank while printing the report to which the field belongs, assuming that they are already printed in the paper.

Similar to the preprinted attribute, when the ‘Preprinted Border’ attribute is set to YES, the borders used in the Field will be assumed to be pre-printed and will be omitted from getting printed.

This attribute work in conjunction with ‘preprinted/ plain’ button in the Print Configuration screen, which sets the variable SVPreprinted to yes informing the system that print is going to happen on a pre printed paper.

Syntax

Preprinted Border: <Logical Condition>

<Logical Condition> is a logical value or an expression that evaluates to a logical value

Example

[Field : TSPL Company Name]
Set as            : ##SVCurrentCompany
Full Width        : yes
Border            : Thin Bottom
Preprinted        : Yes
Preprinted Border : yes

Explanation

The example shows a Field : TSPL Company Name, which displays the company name. With the attributes Preprinted  and Preprinted Border set to Yes, the company name is omitted from printing and so is the border thin bottom. But the space occupied by the field content and border is left blank while printing the report to which the field belongs, assuming that they are already printed in the paper.

While the Background attribute sets the background colour to field on screen, the PrintBG attribute lets you set a background color for the field specifically in print mode — adding clarity and visual appeal to your printed output.

Syntax

Print BG: <Color Name Formula>

<Color Name Formula> is the color definition name or the expression that evaluates to a color definition name

Example

[Field: TSPL Field]

   Set as   : “Field Value”
Print BG : Red

Explanation

The example shows the field TSPL field that displays the text ‘Field Value’ with the background of red in the printed output, via the attribute Print BG.

While the Color attribute sets the font colour to field content on screen, the PrintFG attribute lets you set the font color for the field content specifically in print mode — helping important information pop off the page

Syntax

Print FG: <Color Name Formula>

<Color Name Formula> is the color definition name or the expression that evaluates to a color definition name

Example

[Field: TSPL Field]

   Set as   : “Field Value”
Print FG : Red

Explanation

Font Color of that field content ‘Field Value’ will appear red in the printed output.

 

While the Style attribute sets font style to field content on screen, the Print Style attribute lets you set the font style for the field content specifically in print mode — ensuring your data looks polished, readable, and professional on paper. In absence of this attribute, if style attribute is specified, the same is applied for print output as well.

Syntax

Print Style: <Style Name Formula>

<Style Name Formula> is the style definition name or the expression that evaluates to a style definition name

Example

[Field: TSPL Field]

   Set as      : “Field Value”
Print Style : Small

Explanation

The field content ‘Field Value’ will appear small in the printed output.

When long list of data is displayed in a report, to make the scrolling and navigation through the data much easier and smarter this attribute is used. When QuickSearch attribute of a field in the line is set to yes, you navigate to the line item where the pressed alphabet/key matches the first character of the field content. All the reports in TallyPrime use this attribute to make navigation a delightful experience!

What happens when more than one field in the line has QuickSearch set to yes? Only the first of the fields is honoured for quick search.

Syntax

QuickSearch: <Logical Condition>

<Logical Condition> is a logical value or expression that evaluates to a logical value

Example

[Field: TSPL Ledger Name]

   Use          : NameField
Set as       : $Name
Quick Search : Yes

Explanation

The example shows that the Field: TSPL Ledger Name which displays the ledger names in repeated line, where the user can navigate to the ledger name that matches the pressed alphabet via the attribute QuickSearch.

Very widely used in taxation reports in TallyPrime, this is when you have information that should be in read only mode i.e. non editable, but still the user should be able to navigate to the field. This makes it easier to copy paste information from the field or even drilldown further from there if that is the requirement.

Syntax

Read Only: <Logical Condition>

<Logical Condition> is a logical value or expression that evaluates to a logical value

Example

[Field: TSPL Amount]

    Use       : Amount Field

    Set as    : $Amount

    Read Only : Yes

Explanation

The example shows that the field TSPL Amount displays its contents in read only mode as the attribute Read Only is set to yes.

Whether it is by design or to truncate and round off large amounts to fit the field width, this is the attribute that does the work for you by applying the given scale factor the amount. Tens, hundreds, thousands, lakhs and so on can be used as scale factor for the amounts. Note that this attribute is applicable only to field with data type Amount.

Syntax

Scale : <Scale Factor Expression>

<Scale Factor Expression> is Scale factor like Tens, hundreds, thousands, lakhs and so on or expression that evaluates to this.

Example

[Field: TSPL Amt]
Use   : Amount Field
Set as: $$AsAmount:20087676
Scale : lakhs

Explanation

The field TSPL Amt, displays value of type Amount, is set with value $$AsAmount:20087676. Since the attribute Scale is set to Lakhs, the amount 200.88 will be shown in the field after applying the scale factor.

This attribute gives another dimension of scroll control making navigation much more fun and neater, by enabling the control of specifying in a columnar report with repeated field, from which field onwards the horizontal scrolling can go to next page of the screen. Which means, that the fields before will remain static in the first page like frozen columns, while the rest of the columns will scroll through next pages.  For example, line has name, address, pin and amount which is repeated, and Scroll: Yes is mentioned in field that shows the Pin, then name and address will be the frozen columns and Pin, and repeated amount fields will be scrollable to next page.

In a way this is like how columns are frozen in a excel worksheet. Just that instead of saying freeze these columns, we are indicating from which column scroll to next page should happen.

Some notes

  1. Scroll must be enabled in the part level having repeated lines
  2. Line should have a repeated field
  3. From left to right, the first field where Scroll: Yes is specified, is from where all the fields from that field will be enabled to scroll to next page. Even if any field after this field has Scroll: No, it will be ignored.

Syntax

Scroll: < Logical Expression>

<Logical Expression> is a logical value or a expression that evaluates to a logical value

Example

[Field: TSPL Customer LedAddress]
Set as : $STPartyFullAdd
Width  : 30
Scroll : Yes

Explanation

With the attribute Scroll set to yes, from this field TSPL Customer LedAddress onwards in the line, the columns will be scrollable to next page.

Most of the data that you see on the screen in TallyPrime are set in the fields with this attribute. This attribute defines the actual value that will be shown or printed in the field — putting you in control of the display output. There is a very close relationship with the Type of the field specified using the Type attribute and the value set in the field, so make sure they match!

Syntax

Set as : <Value>

<Value> is the value or expression that evaluates to any value that should be shown in the field

Example

[Field: TSPL Field]

    Use    : NameField
Set as : “Field Value”

Explanation

The field TSPL Field shows the text ‘Field Value’ as specified in the attribute set as.

This attribute ensures the field always shows the latest values by automatically refreshing whenever the variables or fields it depends on are updated. Needless to say this attribute works along with the set as attribute. Numerous fields in TallyPrime use this attribute to make sure change is always reflected and field shows refreshed data.

Syntax

Set always :<logical Condition>

<Logical Condition> is a logical value or expression the evaluates to a logical value

Example

[Field: TSPL Vch Type]

   Use        : Name Field
Set as     : ##SVVoucherType
Set always : Yes

Explanation

With the specification of set always: yes in the field TSPL Vch Type, whenever the value of the variable SVVoucherType changes, the field value gets refreshed showing the latest data.

This attribute sets the field’s value dynamically — based on the condition you define — making your data behave just the way you want.

This is the attribute to go for if the value to be set to your field follows a long If else statement. This attribute can simplify your code and make sure the field is set with correct value all the time and help your debugging easier.

Every set by condition statement is evaluated by the system, so when there are multiple set by condition statements the value specified in the last statement that satisfies the condition is set in the field. if no condition evaluates to true and Set as is available, then it is considered. In a way you can consider use set as to set the default value to the field when all set by condition fails. The order of evaluation in a field is ‘Set by Condition’  ‘ Set as’ ‘info’.

Syntax

Set By Condition: <Logical Condition> : < Value>

<Logical Condition> is a logical value or expression the evaluates to a logical value

<Value> is the value to be set in the field when the logical condition evaluates to yes.

Example

[Field: TSPL Mode]

   Use             : Name Field
Set as          : “Not in Create Mode”
Set By Condition: $$InCreateMode : “Creation”
Set By Condition: $$InCreateMode AND $$InDeveloperMode: “Creation(Developer Mode)”

Explanation

As per the Set by condition attribute statements in the field TSPL Mode, if the report is opened in create mode and the application is in developer mode then   “Creation(Developer Mode)” is set to the field. If the report is only opened in create mode then “Creation” is set to the field. When the report is not opened in create mode “Not in Create Mode” is set to the field as specified by set as, as the set by condition attribute conditions fail and system defaults to the value set via set as attribute.

 

This attribute makes the cursor skip over the field entirely based on a condition — preventing users from editing its value, even in Create or Alter mode. Perfect for keeping certain data untouched! A common application of this is every configuration screen in TallyPrime where even though the configuration is shown, it is skipped until the dependant configuration value changes.

Syntax

Skip: <Logical Condition>

<Logical Condition> is a logical value or expression the evaluates to a logical value

Example

[Field: TSPL Field]

   Use : Name Field
Skip: NOT $$InCreateMode

Explanation

When the cursor moves in the report where the field TSPL Field belongs to, the field is skipped in all the modes of the report, other than create mode, as specified by the condition in the attribute Skip.

If you see the tables in TallyPrime, they are multifunctional in nature. Along with actual data to be selected, one can have table items than can perform actions like create or shut company-which are called action objects, one can have titles in between table items for grouping-which are called label objects, one can have sys names and so on.

When the table pops up, to make it easier to define where the cursor should be placed by default, Skip actions is used to indicate to the system that skip all the action objects in the Table when you are evaluating where to place the cursor in the Table by default. Skip Actions attribute is evaluated only if the attribute ‘Default Table Item’ is not specified or none of the table items satisfies the condition specified in the attribute.

Note that, an object is marked as ‘action’ or ‘external action’ object in its object definition with the object attribute ‘Behave As’

You can see this attribute in use in the fields that shows group name/ ledger name selection in accounting reports

Syntax

Skip Action : <Logical Condition>

<Logical Condition> is a logical value or expression the evaluates to a logical value

Example

[Field: TSPL Ledger Name]

    Use : Name Field
Table : List of ExtractLedgers, TSPL Create Master
Show Table : Always
Skip Actions : Yes

[Collection: TSPL Create Master]
Object     : TSPL Create Master
Format     : $Name
ClientOnly : Yes

[Object: TSPL Create Master]

    Behave as : Action
Name      : $$SysName:CreateNew

Explanation

The example shows the field TSPL Ledger Name displays a table of list of ledgers and Create New action item as specified in the attribute Table. With the specification of the attribute Skip Actions, the cursor is placed on the first ledger shown in the table skipping the action object CreateNew.

This attribute is used when you do not want the value of the field to be exported in excel based on a condition. In other words, the value of the field is left blank when the Skip cell condition evaluates to true – making sure you are in control of what gets exported and what doesn’t!

This attribute is used in taxation reports in TallyPrime.

Syntax

Skip Cell : <Logical Condition>

<Logical Condition> is a logical value or expression the evaluates to a logical value

Example

[Field: TSPL VchType]

   Set as    : $VoucherTypeName
Skip Cell : NOT $$IsSales

Explanation

When the report to which the field TSPL VchType belongs is exported in excel format,  the value is skipped from being exported, when the voucher type is other than Sales, as specified by the attribute Skip Cell.

This attribute lets the cursor bypass the field while moving forward — but if you press Backspace from the next field, the focus smartly returns here.

When it comes to edit reports where user input is needed this attribute can help save time and effort as this will help you skip the already prefilled fields and directly place the cursor on the necessary field where user input in needed, while also giving an option to user to edit the prefilled fields by just moving the cursor to that field.

The Restore company screen in TallyPrime uses this attribute to skip the prefilled destination path.

Syntax

Skip Forward : <Logical Condition>

<Logical Condition> is a logical value or expression the evaluates to a logical value

Example

[Field: TSPL Date]
Use          : Uni date Field
Set as       : ##SVCurrentDate
Skip Forward : Yes

Explanation

When the cursor flows in the report where the field TSPL Date is present, the cursor bypasses the field while moving forward, but user can edit the same by placing the cursor on the field, as specified by the attribute Skip Forward.

Certain Sysnames like End Of List, Not Applicable are used in tables associated with fields to either break line repetition or to say this value is not applicable here. While these appear are line items in the table, they are not data items and usually not the first choice of selection. That is why this attribute SkipSyName is used to indicate to the system to skip all the sysnames in the Table when you are evaluating where to place the cursor in the Table by default.

Skip SysNames attribute affects the cursor placement only if the attribute ‘Default Table Item’ is not specified or none of the table items satisfies the condition specified in the attribute. Not just that, when SkipSysnames evaluates to true, system names selected from table values won’t be stored — helping you maintain cleaner, user-focused data entries.

Syntax

Skip Sysname : <Logical Condition>

<Logical Condition> is a logical value or expression the evaluates to a logical value

Example

[Field: TSPL Ledger Name]

    Use          : Name Field
Table        : List of ExtractLedgers, TSPL Create Master, End Of List
Show Table   : Always
Skip Sysname : Yes

    Storage      : Name

Explanation

The example shows that the field TSPL Ledger Name shows a table which has the sysname EndofList. When the cursor is placed in the table, the cursor skips the sysname EndofList and is placed on the next table item that is not a sysname. Also even if EndofList  is selected, it will not be stored in the storage.

Space left is used to create space on left side of the field value, within the width specified for the field. It’s like leaving out some margin in the left to ensure that the data displayed is cleaner and readable. Since the space available for the actual value of the field to be displayed reduces when space left attribute is specified, be smart to assign width to the field such that the field value display and the spacing, both are taken care of.

Another trivia for you is, if width is specified in characters, then, the width doesn’t include space left and space right if specified, instead the space left and space right are added to the given width.

Syntax

Space Left : <Measurement Formula>

<Measurement Formula> is used to specify the space in a specified unit of measurement.

A Unit of Measurement can be any of the following:

  • Millimeters/mms
  • Centimeters/cms
  • Inch(es)
  • Number of Characters/Number of Lines
  • % Screen/Page
  • Number – Points (where 1 Point = 1/72 Inch)

Example

[Field: TSPL Field]

   Use       : NameField
Set as    : “Particulars”
Space Left: 2

Explanation

The example shows the field TSPL Field displays the value ‘Particulars’ after leaving 2 character space to the left, as specified by the attribute Space Left.

Space Right is used to create space on right side of the field value, within the width specified for the field. Useful to visually separate fields. Since the space available for the actual value of the field to be displayed reduces when space right attribute is specified, be smart to assign width to the field such that the field value display and the spacing, both are taken care of.

Another trivia for you is, if width is specified in characters, then, the width doesn’t include space left and space right if specified, instead the space left and space right are added to the given width.

Syntax

Space Right : <Measurement Formula>

<Measurement Formula> is used to specify the space in a specified unit of measurement.

A Unit of Measurement can be any of the following:

  • Millimeters/mms
  • Centimeters/cms
  • Inch(es)
  • Number of Characters/Number of Lines
  • % Screen/Page
  • Number – Points (where 1 Point = 1/72 Inch)

Example

[Field: TSPL Field]

   Use        : NameField
Set as     : “Particulars”
Space Right: 2

Explanation

In the field TSPL Field, 2 characters of space is left on the right side of the field value ‘particulars’, as specified by the attribute Space Right.

This attribute is the showstopper among the attributes that has the power to change the data in the TallyPrime databased. All those vouchers and masters that you once punched in can be seen again because of the power of this attribute.

The storage attribute saves the field value in the specified method present in the object in context. Whether you want to save a value in an internal method or in an UDF, this attribute is what does the work for you.

Syntax

Storage : <Method Name>[:<Object Path>[:<Filter Condition>]]

<Method Name> Name of the method where the value to be stored.

<Object Path>Specifies the complete path of the Object whose method is altered eg Ledger Entries

<Filter Condition>The condition which is used to filter the Objects

Example

[Field: TSPL Date]

   Use     : Uni date Field
Storage : Date
Set as  : ##SVCurrentDate

Explanation

The value in the field TSPL Date is stored in the method Date as specified by the Storage attribute. The field belongs to a report that is in voucher object context and thus the Date is stored in the voucher context.

When the displayed content looks simple, clean and elegant, no one can take their eyes off it. That’s what this attribute does. It beautifies the content displayed in the field by moulding the font, color and appearance of it. Applies to both Display and Print mode, provided the Print Style attribute is not used within the current Field.

This attribute is a staple for every field in TallyPrime.

Syntax

Style: <Style Name Formula>

<Style Name Formula> is the style definition name or the expression that evaluates to a style definition name

Example

[Field: TSPL Field]

   Set as : “Field Value”
Style  : Small Bold

Explanation

The example shows that the Font style of that field TSPL Field content ‘Field Value’ will appear small and Bold, as specified by the Style attribute

Whether it is to open Bill allocations screen in a voucher or batch allocations screen from stock item master, this is the attribute that makes it possible to design and link input screens in an intuitive and clean way. The subform attribute specifies the report that should be opened from the field when you press enter based on a condition. Multiple subforms can be linked with the field resulting in subforms opening one after the other from the field. Once the subform/subforms are saved the control comes back to the next field in the parent report.

The subform opens in the parent object context making it easier to store and retrieve data in the subform. Also the Report acting as subform has ‘Auto:Yes’ set in the report level indicating to the system that it carries the context from the parent report and also doesn’t bring the confirmation box in the subform.

Syntax

Sub Form : <Report Name> : <Condition>

<Report Name> is the Name of the report

<Condition> is the logical value or expression that evaluates to a logical value that controls the opening of the subform

Example

[Field: TSPL Student Fees Feature]

  Use     : Logical Field
Storage : Student Feature
Sub Form: Course Offered to Students : $$Value

Explanation

In the example, the field TSPL Student Fees Feature, when user selects Yes in the field and presses enter, the report Course Offered to Students opens as subform to capture the courses, as specified by the attribute SubForm.

 

Have you seen how neat and clean the titles in a monthly columnar report is arranged, with borders aligning perfectly and not going over fields? This attribute plays a very important role in making that happen. When ‘common Border’ attribute in a part is set to yes, the borders defined at the field run all through the part. But when a part has more than one line where only the repeated line information needs the borders to run through to create the columns, while the borders should not interfere with the fields in the other lines, then those fields are set with SubTitle: Yes. The company name field and the date fields displayed in Monthly summary reports like stockitem monthly summary is an example for the same.

Syntax

SubTitle : <Logical Condition>

<Logical Condition> is a logical value or expression the evaluates to a logical value

Example

[Field: TSPL Company Name]

   Use        : Sub Title Field
Set as     : ##SVCurrentCompany
Full Width : Yes
Align      : Center
Subtitle   : Yes

Explanation

The field TSPL Company Name displays company name and makes sure the borders of the repeated lines, do not run through this field as the attribute Subtitle is set to yes

This attribute helps apply different field behaviors based on grouped conditions—like Option, but smarter and faster, as it reduces code complexity and improves the performance.

The modifier Option compulsorily evaluates the conditions for all the options provided in the description code and applies all the option statements which satisfy the evaluation conditions. This means that it is not easy to write the code where you just want one of the options to be applied. You must make sure that other options are not applied using a negative condition.

The attribute modifier ‘Switch’ has been provided to support these types of scenarios, where evaluation is carried out only up to the point where the first evaluation process has been cleared.

Apart from this, Switch statements can be grouped using a label. Therefore, multiple switch groups can be created and the first switch case that satisfies the condition would be applied from each group.

Note that the field definition mentioned in the option statement should be defined with the modifier ‘!’ to indicate it is a optional field.

Syntax

Switch : <Label> : <Optional Field Name> : <Condition>
Switch : <Label> : <Optional Field Name> : <Condition>

<Option Field Name> is the Optional field definition

<Logical Condition> is a logical value or an expression that evaluates to a logical value

Example

[Field: TSPL Company Name]

   Set As : ##SVCurrentCompany
Switch: Case Color : TSPLFieldRedColor: ##FieldColorChange
Switch: Case Color : TSPLFieldBlueColor: NOT ##FieldColorChange

   Switch: Case Style : TSPLFieldBold: ##FieldFontChange
Switch: Case Style : TSPLFieldNormal: NOT ##FieldFontChange

[!Field: TSPLFieldRedColor]

   Background : Red

[!Field: TSPLFieldRedColor]

  Background : Blue

[!Field: TSPLFieldBold]

  Style : Small Bold

[!Field: TSPLFieldNormal]

  Style : Small

Explanation

The field TSPL Company Name shows the company name where the color is determined in the switch group case color which further depends on the value of the variable FieldColorChange and font style in switch group case style which further depends on the value of the variable FieldFontChange. In each of the group, the switch statements are evaluated until a condition evaluates to true. The attributes of the optional field whose condition evaluates to true in the switch statement, gets applied to the main field.

Can you imagine TallyPrime without any Tables, where user had to type information in every field? Feels tedious isn’t it! This is the attribute that makes the interaction with TallyPrime a breeze by making the UI design simple intuitive and error free. The Table items are populated from the collection mentioned as a parameter to the attribute. When, multiple Table attributes are provided, the system smartly combines all the tables that satisfies the condition and give it as one table in the field. This makes it important to make sure the Collection design is similar in nature!

Syntax

Table: <Collection Name>: <Logical Condition>

<Collection Name> is the Collection definition Name

<Logical Condition> is a logical value or an expression that evaluates to a logical value

Example

[Field: TSPL Ledger Name]

   Use        : Name Field
Table      : List of ExtractLedgers, TSPL Create Master, End Of List
Show Table : Always

Explanation

The Field TSPL Ledger Name specifies 3 collections mentioned in the attribute Table,  combined in one table with Ledger names from collection List of ExtractLedgers, ‘Create’ action item from collection TSPL Create Master and End of List sys name from collection End Of List.

It becomes so tedious to scroll through all the items in the table to make a selection. What if the table can become responsive and intuitive to make it this process hassle free? That is where Table Search comes into picture. With this attribute, as and when user types, the table can show reduced list of items that contain the typed in characters. Not just that, based on a condition, it can even search all the columns of the table instead of just the first one.

Whether you want a reducing table where search happens on all the columns or just the first column, or a non-reducing table where search happens on all the columns, all can be achieved with this attribute.

Note that, by default, without the application of this attribute, when user types in characters, the items in the table that contains these characters are just highlighted and the search happens only on the first column of the table. But to make it easier, an application setting under Help-settings-display is available to determine what should be the table search behaviour for all the tables. This setting value is applied to all the fields using Table search attribute in the default code. If you want a different behaviour than what’s applied across the application, then you can use this attribute.

Syntax

Table Search: <Enable reducing table search> : <Apply search to all columns>

<Enable reducing table search> is a logical value or expression that evaluates to a logical value, to specify whether we want to enable the reducing of search or not.

<Apply search to all columns> is a logical value or expression that evaluates to a logical value, to specify whether the search criteria should apply to all columns of the table or not.

Example

[Field: TSPL Ledger Name]

   Use          : Name Field
Table        : List of ExtractLedgers, TSPL Create Master, End Of List
Show Table   : Always
Table Search : No : No

Explanation

The field TSPL Ledger Name shows a table of ledgers, which is a reducing table and search on all columns is off as specified by the attribute Table Search.

This attribute displays a small message when the user hovers the mouse over the field. This helps guide users by offering a hint or description about the field’s purpose. This means that, in addition to the static information displayed by Info or Set As attributes, we can provide additional meaningful information using this attribute.

Syntax

Tool Tip : <Value expression>

<Value expression> can be a String or a Formula that evaluates to a string.

Example

[Field : TSPL Led Name]

   Storage  : Name
Tool Tip : “Please Enter the Name of the Ledger”

Explanation

The example shows a field TSPL Led Name, where when the cursor hovers over it, a tooltip message ‘Please Enter the Name of the Ledger’ is displayed as mentioned by the attribute ToolTip

There is a difference between saying this is an animal and this is an animal of type Rabbit. Your understanding becomes more clearer when precise information is given.

That is what this attribute does. It tells the system clearly what type of data the field holds.

Specifying this attribute is like categorising into a bucket like String, Amount, Date, Number, Rate and so on, so that system understands what type of information goes here and hence what are the operations that can be done and what are properties that are applicable here. This makes the Type attribute very important for a field as everything that can be done with and to a field depends on this. It also ensures only values of the given data type is accepted in the field making the system more reliable and less prone to erroneous inputs.

If this attribute is not specified, by default Type is taken as String.

To read more on Data Types and Formats refer to What are Data Types, Operators, and Expressions in TDL? | TallyHelp

Syntax

Type : <Data Type>[: <SubType>]

<Data Type> specifies the data type of the field

<SubType> specifies subtype of the data type if applicable

Example

[Field: TSPL Qty Secondary Field]

   Type : Quantity: Secondary Units
Width: 25

Explanation

The example shows that the field displays the quantity in secondary units, as specified by the attribute Type.

This attribute plays an important role in building a reliable solution in TallyPrime. When Unique is set yes, system makes sure that values entered in the field having whose line is repeated over collection/Aggregate UDF, are unique in nature, avoiding repetition of values. i.e. If the entries are duplicated, an error message Duplicate Entry pops up, thus making sure only right data is entered all the time. Try entering duplicate values for aliases in master creation, you will encounter the action of this attribute.

This attribute will work only when the Field attribute Storage is mentioned and the Line to which the field belongs is repeated over collection/Aggregate UDF. In other words, the intention is to store field value in the database and hence repetition of values has to be avoided. Tip: Do check out if you need to mention the report attributes ‘Object’ or ‘Multi Objects’ for the values to get stored.

Syntax

Unique:<Logical Condition>

<Logical Condition> is a logical value or a expression that evaluates to a logical value

Example

[Field: TSPL Customer Name]

  Use     : Name Field
Storage : Name
Unique  : Yes

Explanation

The attribute Unique avoids the repetition of ledger names in the field TSPL Customer Name, when used in a repeated line.

This attribute is your silent guide. It makes sure user enter valid values and if value is invalid, it doesn’t show any message but just silently doesn’t let the user proceed from the field unless a valid value is entered. The condition mentioned in the attribute is treated as the validation condition, i.e. if the condition is satisfied then the input is treated valid and user can proceed further, but if the condition fails then the input is treated invalid and user cannot proceed.

If you are wondering when this can be used when a more informative validation attribute like control already exists. Not every input flow needs an interruptive message. In some cases, the validation is so obvious that, no message is required, like when user trues to proceed without entering any value. Or it can also be that message about what are right values that can be entered in the field are already given somewhere in the report and hence the field just needs a validation. Like let’s say next to the input field a info already says it should have 4 alphabets and 3 numbers, then there is no need to again give a message to the user that his input is invalid, instead you can just not let the cursor move.

When all the attributes Control, Validate and Notify are mentioned in the field, the order of evaluation will be in the order mentioned here. When one of them gets executed in the order of evaluation, the others are ignored.

Syntax

Validate: <Logical Condition>

<Logical Condition> is an expression that evaluates to a logical value

Example

[Field : TSPL CMP Name]

   Use     : Name Field
Validate: NOT $$IsEmpty:$$Value
Storage : Name
Style   : Large Bold

Explanation

The Attribute Validate, used in the field TSPL CMP Name, controls the user from leaving the field blank, and forces a user input.

This is another powerful attribute than be used to make field act as a variable. What this means is, since field is where user interaction happens, and data is displayed, when field acts as a variable it becomes context insensitive and can be used to pass values from one report to another, like when you drilldown, or hold values that changes when user scrolls over lines. The Variable will assume the data type of the field and need not be defined separately.

This is especially used in creating drilldown reports where the Variable value keeps changing when the user displays the report and scrolls over lines. The variable value will always assume the current line’s Field Value.  This helps for viewing drill down reports and tracking user’s choice.  The subsequent report uses the current field acting as variable value to display the report.

Syntax

Variable: <Variable Name>

<Variable Name> is the name of the variable

Example

[Field: TSPL Customer Led Name]

   Use     : Name Field
Set as  : $Name
Variable: Ledger Name
Display : Ledger Vouchers

Explanation

the example shows that the value of the field TSPL Customer Led Name is held in this variable Ledger Name as specified by the attribute Variable, which will be used in the ledger vouchers drilldown report, as specified by the attribute Display.

This attribute adds more space between characters in the field’s text. Useful when a more spaced-out display is needed for readability or formatting. This also makes sure the text stands out from rest of the titles and the data displayed. To understand how this might look, go to Trial balance report and notice how the ‘Particulars’ title is displayed. Works both for display and edit field.

Syntax

Wide Space : <Logical Condition>

<Logical Condition> is an expression that evaluates to a logical value

Example

[Field: TSPL Particulars Fld]

    Info      : “Particulars”
Full Width: Yes
Wide Space: Yes
Style     : Small Bold
Indent    : 2

Explanation

The field TSPL Particulars Fld displays the text ‘Particulars’ with increased space between the characters as specified by the attribute Widespace.

This attribute along with the indent attribute decides how much space the field should take in the screen. Plays a very important role in making sure the field content is legible, readable and the field is placed properly with respective to all the other fields and UI elements.  If Width and Full Width attribute are specified in the same field, if Full width attribute evaluates to Yes then Width attribute is ignored. If the contents are longer than the available Width, the Field contents are squeezed to accommodate the same within the defined width.

What happens when no width attribute is specified? Then the width the field occupies depends on

  1. If a value is set in the field, width will depend on the number of characters in the content.
  2. If Max attribute is specified and there is no value set or the number of characters in the value set in the field is lesser than Max attribute value, then the width will depend on the number of characters mentioned in the Max attribute.
  3. If there is no Max attribute and a value set, then the width will be equal to a single character.
  4. In any of the cases, if Indent attribute is mentioned, then that will also be considered.

Another trivia for you is, if width is specified in characters, then, the width doesn’t include space left and space right if specified, instead the space left and space right are added to the given width.

Syntax

Width:< Measurement Formula>

<Measurement Formula> is used to specify the width in a specified unit of measurement.

A Unit of Measurement can be any of the following:

  • Millimeters/mms
  • Centimeters/cms
  • Inch(es)
  • Number of Characters/Number of Lines
  • % Screen/Page
  • Number – Points (where 1 Point = 1/72 Inch)

Example

[Field: TSPL Particulars Fld]

   Info  : “Particulars”
Width : 25% Screen
Style : Small Bold
Indent: 2

Explanation

The width of the field TSPL Particulars Fld will be 25% of the screen space as specified by the attribute width.

This attribute is related to defining structure of the XML output of a Report. It could be when the report is exported into a file using the native export utility of TallyPrime or through function by setting variables SVExportFormat to XML and file name in SVPrintFileName and using Export action or by sending XML request to TallyPrime for the report. Refer to these in details in their specific pages.

A XML structure has XML tag, XML attribute and the value corresponding to XML tag . This attribute defines the XML attribute that should be present in the XML output corresponding to the field

For example, if a field needs to produce this <Id TYPE:Name>ABC Company<Id> in the XML output, then ‘XML tag’ attribute will be set to ‘id’, ‘XML Attr’ attribute will be set to ‘TYPE:Name’ and the value set in the field with setas or info will be ‘ABC Company’.

Note that more than one XMLAttr attribute can be given in the same field.

Syntax

XMLAttr : < Expression for Name> : <Expression for Value>

<Expression for Name>In the Name value pair of XML attribute, this is an expression that evaluates to a string that should be shown as the name of the xml attribute

<Expression for Value> In the Name value pair of XML attribute, this is an expression that evaluates to a string that should be shown as the value of the xml attribute

Example

[Field: TSPL Led]

   Set as  : “ABC Company “
XML Tag : “Id”
XML Attr: “TYPE”:”Name”

Explanation

The example shows that when the report to which the field TSPL Led belongs to, is exported in XML format, the corresponding tag for the field in the XML output will be<Id TYPE:Name>ABC Company<Id> as specified by the attributes XML tag and XML Attr.

 

Is this information useful?
YesNo
TallyHelpwhatsAppbanner
Is this information useful?
YesNo
TARA