Download Free Tools for Tally ERP
FREE utilities for Tally Accounting Software

Thursday, February 15, 2007

Example 10: UDFs

You can add new fields in any Master entry screen or Voucher entry screen by creating UDFs (User-defined Fields). UDFs can be of type String, Number, Date, Logical, Amount, Quantity or Rate.



Syntax:-
[System: UDF]
<UDF Name>: <UDF Type>: <Index>: <Is Repeatable>



Example:-
[System: UDF]
MyUDF: String: 1000
Notes:-
1) UDFs are to be defined at the System level.
2) Each UDF must be given a Unique Name.
3) As Index number is to be provided for evey UDF which must be between 1 to 9999.
4) Is Repeatable specifies whether the UDF holds single or multiple values. By default, it is NO, meaning the UDF can store a single value only.

Example:- Adding a new field in the Ledger Master
;;UDF definition
[System: UDF]
MyUDF: String: 1000



;;Modify the Ledger Master entry screen and add a new line
[#Part: Led Other Details]
Add: Line: MyLine



[Line: My Line]
Field: Short Prompt,My Field
;;Display Text
Local: Field: Short Prompt: Set as: "UDF field: "



[Field: My Field]
Use: Short Name Field
Storage: MyUDF

Click here to download the Example 10 compiled file and the source-code.
Tally; Tally Developer and Tally Definition Language are trademarks or registered trademarks of "Tally Solutions", Bangalore.