Type search words and press enter
TallyPrime 5.0 automates TDS calculation under Section 194Q, ensuring compliance with Finance Bill 2021. Easily calculate TDS on transactions, manage threshold limit and exemptions, and file returns seamlessly.
https://help.tallysolutions.com/docs/td9rel54/tdlreference/release_5_4_9.htm

What’s New in Release 5.4.9

On this page

Definition - Rule Set

Definition - Name Set

Data Type – Flag Set

Data Type – Num Set

Attribute - Max

Function – ValidateTINMod97

In TDL, to make the programming simpler and to optimise the reporting and query area, we have introduced two definitions - Rule Set and Name Set , and two data types - Flag Set and Num Set .

Definition – Rule Set

Rule Set is a definition in TDL and can be used to define a set of rules. You can use this definition to evaluate the rules efficiently. Rule Set can be defined with single dimension or multiple dimensions along with flow control. The attribute Rule Set and related functions help to evaluate the defined Rule Sets. The result of a Rule Set is always an Object method of Flag Set data type. The functions related to Flag Set data type allow you to access the Flag Set. Storing the Flag Set result in data base is currently not supported. For example, during voucher acceptance, the Rule Set can be used to check the correctness of data.

The definition Rule Set makes TDL programming simpler because of its ability to allow a developer to scope only one validation at a time and not all of them together. It reduces the code size. It also provides the named identity to access flag set values. Rule Set increases the efficiency of the programme, which is measured on performance and the memory usage.

Syntax

[Rule Set: <Rule Set Name>]

Where,

< Rule Set Name > is the name of the Rule Set.

Various attributes and functions, which are related to Rule Set are explained below:

Attribute – Break On

Break On is a single type attribute with constant value. You can use the attribute Break On in Rule Set definition to determine the continuation of evaluation in the current rule set. It provides vertical flow control to evaluate the rules. Break on can also be mentioned with Rule attribute.

Syntax

Break On: <Logical Constant>

Where, < Logical Constant > is Yes / No .

While evaluating each rule,

If the value of Break On matches with the result of the rule, then the evaluation flow will break and further rules are not evaluated in the current Rule Set. The remaining rule values are defaulted to No .

If the attribute Break On is not specified, the evaluation flow continues, irrespective of the result of rule.

Attribute – Walk On

Walk On is a single type attribute with constant value. The attribute Walk On helps to determine whether the next dimension will be evaluated or not, for the current rule. It has diagonal flow control to evaluate the steps.

Syntax

Walk On: <Logical Constant>

Where, < Logical Constant > is Yes/No.

While evaluating each rule,

If the value of Walk On value matches with the result of the rule, then the evaluation flow continues to evaluate the next dimension in the current rule context. If the next dimensions are not evaluated, the rule values are defaulted to No .

If the attribute Walk On is not specified, the evaluation flow continues to evaluate the next dimension, irrespective of the result of rule.

Attribute – Rule

Rule is a Triple list attribute. You can use the attribute Rule to define a rule. It accepts three parameters.

Syntax

[Rule Set: <Rule Set Name>]

Rule : <Rule Identifier>: <Logical Expression>[: <Keyword>]

Where,

<Rule Identifier> is the name of the rule to identify or access the rule later. “*” and “?” are not supported as rule names.

<Logical Expression> evaluates in the context of requester/source/target object being passed from evaluation context.

<Keyword> specifies the value of Break On sub-attribute for current rule. If no specification is provided, it inherits the Break On attribute value at current rule set level.

Possible options are

True/Yes: When the result of the rule is True/Yes, it stops the evaluation further in the current rule set. The next dimension gets evaluated for the current rule.

False/No: When the result of the rule is False/No, it stops evaluating further.

Never: It continues the evaluation, irrespective of rule result.

Example

[Rule Set: My Rule Set]

;; Yes/No or Not Specified

Break On : Yes

Rule : A1 : @@TNAnnexure1Included

Rule : A2 : @@TNAnnexure2Included: No

In the above example, A1 , A2 are rule identifiers. @@TNAnnexure1Included and @@TNAnnexure2Included are rule expressions.

Attribute – Aggr Rule

Aggr Rule is a Triple list type attribute and it accepts constant values as parameters. You can use Aggr Rule to specify various pre-defined aggregation for Rule Set.

Syntax

Aggr Rule: <Identifier>: <Type of aggregation>[: <Level Indicator>]

Where,

<Identifier> is to specify the identifier for the aggregate rule. It can be accessed from Flag Set like any other flags.

<Type of aggregation> is to specify the type of aggregation. (Any True / OR, All True / AND)

<Level Indicator> is to indicate the level for aggregation. It is always relative to current rule set. The default value of this parameter is One. This parameter to be specified by using a level number from current rule set to identify the level.

The aggregate flags are accessed using the same dotted notation like any other flags. Value of these rule flags are aggregation results, which are computed at the time of rule evaluation.

When multiple flag sets are aggregated, similar to Aggr Compute: SUM in collection, these aggregate flags are also further aggregated (counts) into Num Sets.

The first Aggr Rule result of the root/top level Rule Set is stored into the Zero th flag. If no aggregate rule is specified in the hierarchy, the first rule result is stored at Zero th flag.

Zero th flag value is also referred as the master aggregate rule value .

Attribute – Rule Set

Rule Set is a Triple list attribute. You can use the attribute Rule Set to specify the rule set for next dimension of each rules in the current rule set. Rule Set attribute accepts three parameters.

Syntax

Rule Set: <Rule Set Name>: [<CurrentDefinitionRules> : <NextDimensionRules>]

Where,

<Rule Set Name> is the name of the next dimension Rule Set. It is the Rule Set description reference to another Rule Set definition.

<CurrentDefinitionRules> are the rules in the current rule set and it has the given Rule Set as next dimension. If it is not specified, it assumes all rules in the current rule set have the given rule set as next dimension.

<NextDimensionRules> are the rules in next dimension Rule Set that have to be evaluated. If not specified, it assumes all rules in next dimension rule set are to be evaluated. The results are available as part of the Flag Set generated by Rule Set evaluation.

The attribute Rule Set accepts multiple values. Each rule can have a different Rule Set for its next dimension.

A Rule Set already present in the hierarchy at any level is not allowed to be specified as the next dimension again.

Attribute – Name Set

Name Set is a Single type attribute. You can use the attribute Name Set to specify the default name set definition for the current rule set. In general, Name Set contains rule descriptions.

Syntax

Name Set: <Name Set Definition Name>

Where,

<Name Set Definition Name> is the name of Name Set definition to map the current rule set. Name Set can be used in two ways:

1. To specify the default name of the name set definition name, when it is used with the attribute Name Map, without using the third parameter of Name Map.

2. Use the attribute Name Set without using Name Map – automatically it will get mapped based on the rules in the current rule set, if the identifiers in Name Set match the rule identifier.

Attribute – Name Map

Name Map is a triple list type attribute. You can use the attribute Name Map to specify explicit name mapping for Rule descriptions. It accepts three parameters.

Syntax

Name Map: <Rule Name>:<Name Identifier>[:<Name Set Definition Name>]

Where,

<Rule Name> is an identifier to Rule in current rule set. This name is defined in Rule attribute.

<Name Identifier> is specified in the Name Set definition.

<Name Set Definition Name> is an optional parameter and it is the name of Name Set definition. If this sub-attribute is specified, then the string value is accessed from Name Set which is mentioned here. If it is not mentioned it assumes the Name Set Definition Name mentioned in Name Set attribute in the current Rule Set.

Either the third parameter of Name Map or a Name Set attribute should be specified. Otherwise the specific name map will be ignored.

Name Map is useful to map the error strings inline with each Rule Set.

Function – EvaluateRuleSet

The function EvaluateRuleSet evaluates the Rule Set and returns a Flag Set data type. It returns a Flag Set type, which is constructed with flags and dimensions as per the Rule Set definition provided, and evaluated on the current contexts.

Syntax

$$EvaluateRuleSet:<Rule Set Name>

Where,

<Rule Set Name> is the name of the Rule Set definition. It returns Flag Set data type.

Static modifiers like Add, Change, and Delete are supported in rule set definition.

Local formula is supported with the definition rule set. The local formula can be accessed only from the Rule Set in which the local formula is defined.

Example – Rule Set

[Rule Set: My Rule Set]

;; Yes/No or Not Specified

Break On : Yes

;;RuleName ;; Rule Logical Expression ;; break on (override)

Rule : A1 : @@TNAnnexure1Included

Rule : A2 : @@TNAnnexure2Included : No

Rule : A3 : @@TNAnnexure3Included

...

;; Second Dimension RuleSet ;; My Rules ;; Dimension Rules (Filter)

RuleSet : Anx_ErrorsA : A1 : EA1, EA2

RuleSet : Anx_ErrorsB : A2, A3 : EB2, EB3

;; Aggregate Rules

Aggr Rule : Is Included In Any Annexure: IsAnyTrue : 1

Aggr Rule : Has Any Error : IsAnyTrue : 2

;; option1 Name Set mapping

[Rule Set: Anx_ErrorsA]

Break On : Yes

;; ;;RuleName ;; Rule Logical Expression ;;break/continue condition

Rule : EA1 : @@TN_Error1

Rule : EA2 : @@TN_Error2 : No

Rule : EA3 : @@TN_Error3

[Rule Set: Anx_ErrorsB]

Break On : Yes

;; ;;RuleName ;; Rule Logical Expression ;; break/continue condition

Rule : EB1 : @@TN_Error4

Rule : EB2 : @@TN_Error5 : No

Rule : EB3 : @@TN_Error6

In the above example, My Rule Set is the name of the Rule Set. A1 , A2 , and A3 are three different rules defined under My Rule Set . The rule A2 has Break On override by setting its third parameter as No . In this case rule A2 works based on the local value of Break On . @@TNAnnexure1Included, @@TNAnnexure2Included , @@TNAnnexure3Included are logical expressions and defined for A1 , A2 , A3 respectively.

Anx_ErrorsA , Anx_ErrorsB are second dimension rule sets. Using these rule sets, it filters the first dimension rules based on the requirement. The rules EA1 and EA2 are second dimension rules and these rules are applicable only for the Rule A1 . Similarly, EB2 and EB3 rules are applicable only for A2 and A3 .

Is Included In Any Annexure and Has Any Error are two aggregate rules defined to pre-compute the aggregation for the Rule Set MyRuleSet by identifying the level. The aggregate rule Is Included In Any Annexure evaluates in the first level whereas the aggregate rule Has Any Error evaluates in the second level.

Definition – Name Set

Name Set is a definition to ensure that strings are always segregated and separated from the source code expressions. It helps to define a set of Name-Value pairs.It is a convenient way to define static string data, and access the strings easily.

You can use Name Sets to define application string groups like – error strings for a given rule, static application data like list of states, list of countries, and so on. Name Set also supports being specified as the data source in a collection. It will results in a collection where each object represents a Name-Value pair in the Name Set.

You need to define all strings of the application together using Name Sets to make the corrections of strings easy. In other words, managing strings is made easier by using Name Set.

Syntax

[Name Set: <Name Set Name>]

Where,

<Name Set Name> is the name of the Name Set.

Various attributes and functions in Name Set are explained below:

Attribute – List Name/List

List Name is a Dual list type attribute with a constant name and value. You can use the attribute List Name to specify the identifier and the string. The identifier can be used to access the value stored in the list.

Syntax

List Name : <string identifier 1> : <string 1>

List Name : <String identifier 2> : <string 2>

Where,

< string identifier 1 >, < string identifier 2 > are user defined identifiers for the strings < string 1 >, < string 2 >.

Function – NameGetValue

Function NameGetValue returns a string in the Name Set based on the values passed. The function NameGetValue takes two parameters, String identifier and Name Set Description Name .

Syntax

$$NameGetValue:<String Identifier>:<Name Set Description Name>

Where,

< String Identifier > is the list name identifier.

< Name Set Description Name > is the name of the Name Set.

Example

[Nameset : AnnexureErrorStrings]

List Name : E1 : "PAN Number Invalid"

List Name : E2 : "Lorry Number Missing"

List Name : E3 : "Commodity Code is Empty"

[Function NameSetTestFunction]

01 : LOG : $$NameGetValue:E2:AnnexureErrorStrings

;; This will print "Lorry Number Missing"

[Collection: My Collection]

Data Source : Name Set : AnnexureErrorStrings

The collection My Collection delivers 3 objects, as given below:

$Name: E1, $Value = "PAN Number Invalid"

$Name: E2, $Value = "Lorry Number Missing"

$Name: E3, $Value = "Commodity Code is Empty"

Data Type – Flag Set

Flag Set data type stores a set of logical values/flags. It takes less memory to store flag set values compared to the memory takes to store individual logical values. It allows to perform operations on the stored values. This is a variable length data type and hence has no restriction on the number of flags. Currently, Flag Set is generated as a result of Rule Set evaluation. You can use Flag Set data type in Variables and Objects.

This data type is not directly input-able by the user and not directly displayable to the user.

The following Flag Set functions help you to perform the operations on Flag Set data type.

Function – FlagGetValue

You can use the function FlagGetValue to get the value of a flag inside a Flag Set. It returns a logical value.

Syntax

$$FlagGetValue:<Rule Identifier>:<Flag Set Expression>

Where,

< Rule Identifier > is a constant identifier or an expression that results in a rule identifier which is in dotted notation.

< Flag Set Expression > evaluates to a Flag Set value.

Example

$$FlagGetValue:A1.B2:$MyFlagSet

For flag names, a dotted notation must be used to denote fully qualified name of a flag. It shows the path of rule evaluation.

When “*” is passed as the Rule Identifier, it returns the master aggregate value (Zero th flag value) of the Rule Set.

Function – FlagSetOR

The function FlagSetOR takes two flag sets as input and it performs the OR operation on them. It returns a Flag Set data type. Both flag sets must be obtained by evaluating the same rule set (potentially with different objects), otherwise this function fails.

Syntax

$$FlagSetOR:<Flag Set 1>:<Flag Set 2>

Where,

< Flag Set 1 > is the first Flag Set expression.

<Flag Set 2> is the second Flag Set expression.

Example

$$FlagSetOR:$FlagSetA:$FlagSetB

Function – FlagSetAND

The function FlagSetAND takes two Flag Sets as input and it performs AND operation. It returns Flag Set data type. Both flag sets must be obtained by evaluating the same rule set (potentially with different objects), otherwise this function fails.

Syntax

$$FlagSetAND:<Flag Set 1>:<Flag Set 2>

Where,

< Flag Set 1 > is the first Flag Set expression.

< Flag Set 2 > is the second Flag Set expression.

Example

$$FlagSetAND:$FlagSetA:$FlagSetB

Function – FlagsIsAllTrue

The function FlagsIsAllTrue returns true, if all child rules under given rule are True (AND operator). It returns a logical type.

Syntax

$$FlagsIsAllTrue:<Parent Rule Identifier>:<Flag Set Expression> [:<Belongs To>]

Where,

<Parent Rule Identifier> is a constant identifier or an expression that results in a rule identifier which is in dotted notation. This is used as parent flag.

<Flag Set Expression> is the expression which results in a Flag Set on which this operation is to be performed.

<Belongs To> is the logical value to decide whether only immediate children, or all children in the hierarchy of the given parent rule, to be considered. If this parameter is not specified, the default value is No.

Example

$$FlagsIsAllTrue:A1:$MyFlagSet:Yes

”*” can be passed as Rule Identifier to perform the operation from the root rule set level. If the parent rule does not have any child rules, then the function returns No .

Function – FlagsIsAllTrueFromLevel

The function FlagsIsAllTrueFromLevel returns True , if all flags are True at a given level. It returns a logical value.

Syntax

$$FlagsIsAllTrueFromLevel:<Peer Rule Identifier>:<Flag Set Expression> [:<Leaf Rule Filter>]

Where,

<Peer Rule Identifier> is a constant identifier or an expression that results in a rule identifier which is in dotted notation. It is used to specify the level and the starting point of the aggregation/operation/walk.

<Flag Set Expression> is the expression which results in a Flag Set on which this operation is to be performed.

<Leaf Rule Filter> is the Rule Name to filter the non-qualified leaf flag. If specified, only rules ending with this Rule Name will be considered for the aggregation. If not specified, all rules at the specified level will be considered.

Example

$$FlagIsAllTrueFromLevel:A1.B1:$MyFlagSet:B1

In the above example, the rule B1 is the Leaf Rule Filter. A1.B1 denotes the second level and the starting point for aggregation. Since B1 is the Leaf Rule Filter, it considered A1.B1 and other rules which ends with B1 . The rules such as A1.B2 will not be considered.

“*” is not applicable for this function.

It walks all flags in the same level as that of the Rule Identifier specified, starting from the given rule identifier. To consider all rules at a certain level, specify the identifier of the first rule in that level.

Function – FlagsIsAnyTrue

The function FlagsIsAnyTrue returns True , if any child rule of a given flag is True (OR operator). It returns a logical value.

Syntax

$$FlagsIsAnyTrue:<Parent Rule Identifier>:<Flag Set Expression> [:<Belongs To>]

Where,

<Parent Rule Identifier > is a constant identifier or an expression that results in a rule identifier which is in dotted notation. This is used as parent flag.

< Flag Set Expression > is the expression which results in a flag set on which this operation is to be performed.

<Belongs To> is the logical value to decide whether only immediate children, or all children in the hierarchy of the given parent rule, to be considered. If this parameter is not specified, the default value is No.

Example

$$FlagsIsAnyTrue:A1:$MyFlagSet:Yes

“*” is used to perform the operation from the root rule set level.

If the parent rule does not have any child rules, then the function returns No .

Function – FlagsIsAnyTrueFromLevel

The function FlagsIsAnyTrueFromLevel returns True, if any flags are True at a given level. It returns a logical value.

Syntax

$$FlagsIsAnyTrueFromLevel:<Peer Rule Identifier>:<Flag Set Expression>:<Leaf Rule Filter>

Where,

<Peer Rule Identifier> is a constant identifier or an expression that results in a rule identifier which is in dotted notation. It is used to specify the level and the starting point of the aggregation/operation/walk.

<Flag Set Expression> is the expression which results in a Flag Set on which this operation to be performed.

<Leaf Rule Filter> is the Rule Name to filter the non-qualified leaf flag. If specified, only rules ending with this Rule Name will be considered for the aggregation. If not specified, all rules at the specified level will be considered.

Example

$$FlagIsAnyTrueFromLevel:A1.B1:$MyFlagSet:B1

In the above example, the rule B1 is the Leaf Rule Filter. A1.B1 denotes the second level and the starting point for aggregation. Since B1 is the Leaf Rule Filter, it considered A1.B1 and other rules which ends with B1 . The rules such as A1.B2 will not be considered.

“*” is not applicable for this function.

This function walks all flags in the same level as that of the Rule Identifier specified, starting from the given rule identifier. To consider all rules at a certain level, specify the identifier of the first rule in that level.

Function – FlagsCount

You can use the function FlagsCount to get the number of flags under a given parent rule matching the value passed. It returns a number type.

Syntax

$$FlagsCount:<Parent Rule Identifier>:<Flag Set Expression>: [<Flag Value>:<Belongs To>]

<Parent Rule Identifier> is a constant identifier or an expression that results in a rule identifier which is in dotted notation. This is used as parent flag.

<Flag Set Expression> is the expression which results in a Flag Set on which the operation is to be performed.

<Flag Value> is a logical value. It can be either True/Yes or False/No. It is used to count flags that match this value. The default value is True/Yes .

<Belongs To> is the logical value to decide whether only immediate children, or all children in the hierarchy of the given parent rule, to be considered. If this parameter is not specified, the default value is No.

Example

$$FlagsCount:A1:$MyFlagSet:Yes:Yes

*” is used to perform the operation from the root rule set level. If the parent rule does not have any child rules, then the function returns 0 .

Function – FlagsCountFromLevel

You can use the function FlagsCountFromLevel to get the number of flags at the same level, across parents, matching the flag value passed. It returns a number type.

Syntax

$$FlagsCountFromLevel:<Peer Rule Identifier>:<Flag Set Expression>: [<Flag Value>:<Leaf Rule Filter>]

Where,

<Peer Rule Identifier> is a constant identifier or an expression that results in a rule identifier which is in dotted notation. It is used to specify the level and the starting point of the aggregation/operation/walk.

<Flag Set Expression> is the expression which results in a flag set on which this operation is to be performed.

<Flag Value> is the logical value. It can be either True/Yes or False/No. It is used to count flags that match this value. The default value is True/Yes .

<Leaf Rule Filter> is the Rule Name to filter the non-qualified leaf flag. If specified, only rules ending with this Rule Name will be considered for the aggregation. If not specified, all rules at the specified level will be considered.

Example

$$FlagCountFromLevel:A1.B1:$MyFlagSet:Yes:B1

“*” is not applicable for this function.

If “?” is specified as the leaf rule filter, the leaf rules will be counted only once and duplicates will be ignored.

This function walks all the flags in the same level as that of the rule identifier specified, starting from the given rule identifier. To consider all rules at a certain level, specify the identifier of the first rule in that level.

Function – FlagGetDescription

You can use the function FlagGetDescription to get a String description for the given Rule Identifier. It returns a string type.

Syntax

$$FlagGetDescription:<Rule Identifier>:<Flag Set Expression>

< Rule Identifier > is a constant identifier or an expression that results in a rule identifier which is in dotted notation.

<Flag Set Expression> is the expression which results in a flag set. It is used to identify the Rule Set from which the rule description is to be obtained.

Example

$$FlagGetDescription:A1:$MyFlagSet

“*” is not applicable for this function.

It returns a description string associated with the rule identifier.

Function – FlagsListDescription

You can use the function FlagsListDescription to get the list of string descriptions of all immediate child rules for the parent rule identifier passed, separated by the given character. It returns a string type.

Syntax

$$FlagsListDescription:<Parent Rule Identifier>:<Flag Set Expression>: [<Flag Value>:<Separator Character>]

Where,

<Parent Rule Identifier> is a constant identifier or an expression that results in a rule identifier which is in dotted notation. It is the parent rule name.

<Flag Set Expression> is the expression which results in a Flag Set on which the operation is to be performed. It is also used to identify the Rule Set from which the rule descriptions are to be obtained.

<Flag Value> is the logical value. It can be either True/Yes or False/No. It is used to get descriptions of flags that match this value. The default value is True/Yes .

<Separator Character> is a string value to separate string descriptions. If not specified, the default separator is used.

Example

$$FlagsListDescription:A1:$MyFlagSet:Yes:","

It considers all immediate child rules which match the flag value passed. ”*” can be passed as the parent rule identifier to get the descriptions from the rules in the first level.

Function – FlagsListDescriptionFromLevel

You can use the function FlagsListDescriptionFromLevel to get a list of unique string descriptions for the set of rules/flags from a given level, across parents that match the flag value passed. It returns a string type.

Syntax

$$FlagsListDescriptionFromLevel:<Peer Rule Identifier>:<Flag Set Expression>:[<Flag Value>:<Separator Character>]

Where,

<Peer Rule Identifier> is a constant identifier or an expression that results in a rule identifier which is in dotted notation. It is used to specify the level and the starting point of the aggregation/operation/walk.

<Flag Set Expression> is the expression which results in a Flag Set on which the operation is to be performed. It is also used to identify the Rule Set from which the rule descriptions are to be obtained.

<Flag Value> is the logical value. It can be either True/Yes or False/No. It is used to get descriptions of flags that match this value. The default value is True/Yes .

<Separator Character> is a string value to separate string descriptions. If not specified, the default separator is used.

Example

$$FlagsGetDescriptionListFromLevel:A1.B1:$MyFlagSet:Yes:","

In the above example, all descriptions at the level of rule A1.B1 and starting from the rule A1.B1 will be considered. However, a description will be considered only once. Rule A1.B1 and A2.B1 will refer to the same description, (i.e., description of Rule B1, assuming in both cases B1 is referring to same rule) but the description will be taken only once.

Function – AsFlagSet

You can use the function AsFlagSet to convert a Num Set to a Flag Set which allows the use of all Flag Set functions. It creates an equivalent Flag Set considering all non-zero numbers as True, and zero numbers as False .

Syntax

$$AsFlagSet:<Num Set Expression>

Where,

<Num Set Expression> is the expression evaluates to a Num Set value .

Example

$$AsFlagSet:$MyNumSet

This conversion leads to a loss of count information in the resultant flag set. A True value in the flag set only represents a non-zero value in the original num set. However, the exact value cannot be obtained.

Data Type – Num Set

The data type Num Set stores and operates a set of numbers. This is a variable length data type and hence has no restriction on the number of values that it can hold.

This data type is not directly input-able by the user and not directly displayable to the user.

The following Num Set functions help you to perform the operations on Num Set data type.

Function – NumGetValue

Use the function NumGetValue to get a value inside a Num Set. It returns a number type.

Syntax

$$NumGetValue:<Rule Identifier>:<NumSet Expression>

Where,

<Rule Identifier> is a constant identifier or an expression that results in a rule identifier which is in dotted notation.

<Num Set Expression> is the expression that evaluates to a Num Set from which the number is to be fetched.

Example

$$NumGetValue:A1.B2:$MyNumSet

”*” helps to extract the master aggregate value (Zero th num value) of the rule set.

Function – AsNumSet

You can use the function AsNumSet to convert a Flag Set to a Num Set.

Syntax

$$AsNumSet:<Flag Set Expression>

Where,

<Flag Set Expression> is any expression of Flag Set data type.

Example

$$AsNumSet:$MyFlagSet

It creates an equivalent Num Set by considering all False values as zero , and True as one .

The Num Set generated by this function will contain only 0s and 1s.

Other Enhancements

Attribute – MAX

You can use the attribute MAX at field definition to specify the maximum number of characters that can be entered in the field. It also helps to control the field length with some specific number of characters based on a conditional expression. The expression is evaluated while opening the report.

Alias for this attribute is Maximum . This attribute accepts a number which is less than 972.

Syntax

MAX : <Numerical Expression/Constant>

Where,

< Numerical expression > evaluates to a number.

For example, in Tally.ERP 9, the field PAN/National Identity Number accepts only 10 characters, because India restricts the PAN number with 10 characters. However, by using this attribute enhancement, based on the country selected, we can control the length of the field.

Example

Max :If $$Number:$OpeningBalance:Ledger:"Cash"< 6 then 9 else $OpeningBalance:Ledger:"Cash"

Function – ValidateTINMod97

You can use the function ValidateTINMod97 to check if the TIN provided is valid or not. It takes an input string which is the TIN and returns a logical value. It returns True , if the input string is a valid TIN.

To check if the given string is a valid TIN, the function performs the following:

1. Extract the digits from the alphanumeric string and check if there are exactly 11 digits.

2. Rotate the number clockwise 4 times, perform MOD operation on the resulting number with 97, and check if the remainder is 1.

The TIN is not valid, if any of the above checks fail.

Syntax

$$ValidateTINMod97:<Alphanumeric Value>

Where,

<Alphanumeric Value> is the TIN having alphabets as prefix/suffix.

Example

[Field: Mod 97]

Use : Name Field

Set as : 27240039198

Notify : IsValidTIN : Yes

[System: Formulae]

ValidateTin : $$ValidateTINMod97:$$Value

IsValidTIN : If @@ValidateTIN then "Valid" Else "NOT Valid"