You cannot view this unit as you're not logged in yet.

18 thoughts on “Structure of TDL, Data types, UDF and its usage

  1. NAUSHAD VALIYAPEEDIKAYIL PADINHARE says:

    Sir i did same as above , there is no error but i could not find any result.
    Regards,
    Naushad

  2. Dear Mahendra

    To test “Local” as described by you above, i wrote the following code, but it throws an error”Error in TDL, Line LnLocal, No fields or Lines”, pls advise, how to treat a field as local.

    [#Menu: Gateway of Tally]
    Add: Item: Test Local: Display: RptLocal
    [Report: RptLocal]
    Form: FrmLocal
    [Form: FrmLocal]
    Part: PrtLocal
    [Part: PrtLocal]
    Lines: LnLocal, LnAlternateLine
    [Line: LnLocal]
    Local: Field: fldSample: Set as: “Hello”
    [Line: LnAlternateLine]
    Field: FldSample

    1. Hello Sudhir,
      First you need to add fields to your line.
      Here you didn’t added any field at the line level.
      [Line : lnLocal]
      Field : fldsample
      local : field : Fldsample : set as :”Hello”
      local : Field : Fldsample : color : blue
      Try this way

  3. Dear Mahendra

    Thanks for your prompt response, but on declaring field as suggested by you, now it is showing error as: “Error in TDL, ‘Field FldSample’, couldn’t find description!”.

    My code now shows as under:
    [#Menu: Gateway of Tally]
    Add: Item: Test Local: Display: RptLocal
    [Report: RptLocal]
    Form: FrmLocal
    [Form: FrmLocal]
    Part: PrtLocal
    [Part: PrtLocal]
    Lines: LnLocal, LnAlternateLine
    [Line: LnLocal]
    Field: FldSample
    Local: Field: fldSample: Set as: “Hello”
    [Line: LnAlternateLine]
    Field: FldSample
    Local: Field: fldSample: Set as: “Hi….”

    1. you need to define the field also.
      Which you didn’t done

      [Field : FldSample]
      Use : Name Field

      I thought you will add the field

  4. Thank you so much, it is working now!

    From whatever i studied so far, i got the impression that we first need to declare a thing (may it be report or form or part or line or field or style) and then we need to define the same.
    Accordingly, i was under the impression that first in the code above, we declare a field ‘fldSample’ and in the next line of code, (Local: Field: fldSample: Set as: “Hello”), we defined it, but seems i am missing something? can you please clarify?

    1. Let me explain it to you.

      We need to add a definition type and then we need to define that definition name

      [Part : My Part] ;; This is definition name assuming that it is already added in any of your form and you are adding a new definition type in your form ;;now here we are defining this my part new definition name
      Add : My Line One , My LineTwo
      ;; Here we are adding two new definition type of line now we need to define this new lines

      [Line : MyLineOne]
      Use : Name Field ;; we are using the default Tally TDL field so no need to define this field again in our code to save our time
      local : Field : Name Field : set as : “This belong to line one”

      Now lets define the second line and use the same field again to save our time
      [Line : MyLineTwo]
      Use :Name Field ;; again we are saving our time and not adding any new field
      local : Field : Name Field : set as :”this field belong to second line”
      local : Field : Name Field : color : Blue
      Try this code and see the difference

      this is the power of the local it help us to save our time
      Name Field, Medium Prompt etc are the default tally TDL code which we can use to save our time and here we don’t need to define them again

      Once you do that, see the result and revert back, will explain it more.
      Then you can test if further
      Instead of using the name field you add your own custom field define it and use the same field in both the line but use different set us to display two different text

      by that way you get the complete idea however if you face any issue, revert back to me

  5. Thanks for the detailed explaination, seems i got the idea behind it described below as understood by me:

    In the code above, first we declare the field by stating (Field: FldSample)

    Next line of code i.e. (Local: Field: fldSample: Set as: “Hello”) is another declaration (NOT FIELD DEFINITION) which empowers us to reuse fields attributes defined somewhere in our code.

    and next set of code lines i.e.(
    [Field: FldSample]
    Use: Name Field
    ) is actual field definition.

    Please correct me if i am wrong.

    1. yes, exactly

      and if you reusing an existing definition name then you don’t need to define the same again else your code will throw an error

  6. swamisantosh says:

    in DOB.txt tutorial we adding line to [#Part:LedContact]
    but if (in Ledger Configuration……….Provide contact details…is No)
    The New Line Added is not display….
    how to check status of [Provide contact details(Yes/No)] through TDL.

  7. PRASHANTHA S says:

    Dear sir,
    First i tell you thank you very much for giving me this type of course life time learning the tdl course,

    sorry i can’t understantd about LOCAL
    please show any complite code useage of LOCAL .

    i write these code but it is not showing any error , its show only blank form what is error in this code p
    [#Menu: Gateway of Tally]
    Add: Item: Local TDL: Display: LocReport
    [Report: LocReport]
    Form: locform
    [Form: locform]
    Part: locpart
    [Part: locpart]
    Line: myLineone,alterline
    [Line: myLineone]
    Field: roopa field
    [Field: roopa field]
    Local: Field: roopa field: Set as: ” This is local world test”
    Local: Field: roopa field: Color: Red
    [Line: alterline]
    Field: shilpa field
    [Field: shilpa field]
    Local: Field: shilpa field: Set as: ” hello ”
    Local: Field: shilpa field: Color: blue

    1. Hello Prasantha,
      While learning a new coding language, we don’t need to understand everything from 1st or from the few chapters. You don’t need to understand every lines in codes in the very beginning. You have just to follow the course chapters carefully and write codes exactly same as per the course chapters. First priority is to get yourself familiar with codes and not to understand them Because those stuffs are explained in the later chapter.
      The codes you wrote above are not matching in anyways with the course chapter. So, please read the chapter again and again and write them exactly as per the course chapters.

  8. akash sharma says:

    hello sir, i wrote this code but unable to enter any data
    [#Menu: gateway of tally]
    Add: Item: DEMO Field:Display:demoreport
    [Report:demoreport]
    Form: demoform
    [Form: demoform]
    Part: demopart
    [Part:demopart]
    Line: demo line
    [Line: demo line]
    Field:short prompt, fld1, medium prompt, fld2, long prompt, fld3
    Local: Field:short prompt :Set as:”this is short field”
    Local: Field:medium prompt:Set as:”this is medium field”
    Local:Field:long prompt:Set as:”this is long field”

    [Field: fld1]
    Use:logical field
    Storage:fld1
    [Field:fld2]
    Use:name field
    Storage:fld2
    [Field:fld3]
    Use:number field
    Storage:fld3

    [System:UDF]
    fld1:Logical:10010

    [System:UDF]
    fld2:String:10011

    [System:UDF]
    fld3:Number:10012

    1. Please use only name Field, number field
      also don’t use Storage too
      so chnage your codes and then let me know
      since this is a simple report wihout any object associated with it there should be only simpel fields like name fields, number field
      and also it shold be hard codes
      [Field : fld1]
      use : Name Field
      set as :”Hello”

  9. KIRAN HIREMATH says:

    Hello Sir,
    This I have executed this TDL , It works in Forms but not prompting user to enter the data.
    [#Menu:Gateway of Tally]
    Add:Item:My new TDL Report:Display:My First Report

    [Report: My First Report]
    Form :My first form

    [Form: My first form]
    Part :My new part

    [Part: My new part]
    Add :Line :PromptLine

    [Line: PromptLine]
    Field :Short Prompt,fld1,Medium Prompt,fld2,Long Prompt,fld3
    Local :Field :Short Prompt :Set as :” This is a Short Field: ”
    Local :Field :Medium Prompt :Set as :”This is a Medium Field:”
    Local :Field :Long Prompt :Set as :” This is a Long Field: ”

    [Field:fld1]
    Use: logical

    [Field:fld2]
    Use: Name Field

    [Field:fld3]
    Use: Name Field

    1. Cause storing data there doesn’t serve any purpose.
      You can save data to an object like Ledger, Stock item, voucher etc.
      The code you wrote is a simple report which is not associated with any object so its of no use.
      Ofcourse you can still enter values
      Change display to execute then it will prompt you to enter data

      [#Menu:Gateway of Tally]
      Add:Item:My new TDL Report:Execute:My First Report

Leave a Reply