how to make a if condition in below code if it is "yes" than it should work

Discussion in 'Tally & TDL Learning HUB' started by shihab21, Jun 30, 2022.

    
  1. shihab21

    shihab21 New Member


    please find a code here :-

    [#Part: VTYP Behaviour]

    Add:Line:At End:VTYP_ADD

    [Line:VTYP_ADD]
    Field:Long Prompt,inv
    Local:Field:Long Prompt:Info:"Enable Invoice Format"
    Local:Field:Lomg Prompt:Color:red

    [Field:inv]
    Type:Logical
    Use:Logical Field
    Storage:inv

    [System:UDF]
    inv:logical:40150



    [#Part : EXPINV OpPageBreak]

    Add : Part : At Beginning : DemoTDL

    [Part : DemoTDL]

    Horizontal Alignment:Right
    Line:Empty
    invisible:Not $$InPrintMode
    Graph type:"C:\Users\Javeed\Desktop\tdlof valve fit\ALAMEEN_LOGO.jpg"
    Width : 100% screen
    Height : 12% screen
     


  2. sattam

    sattam Active Member


    Try This,
    Code:
    [#Part: VTYP Behaviour]
    
    Add:Line:At End:VTYP_ADD
    
    [Line:VTYP_ADD]
    Field:Long Prompt,inv
    Local:Field:Long Prompt:Info:"Enable Invoice Format"
    Local:Field:Lomg Prompt:Color:red
    
    [Field:inv]
    Type:Logical
    Use:Logical Field
    Storage:inv
    
    [System:UDF]
    inv:logical:40150
    
    [System: Formula]
       EnableInvFormat :  $inv:VoucherType:##SVVoucherType = "Yes"
    
    [#Part : EXPINV OpPageBreak]
    
    Add:Option   : MyEXPINV OpPageBreak:@@EnableInvFormat
    
    [!Part:MyEXPINV OpPageBreak]
    
    Add : Part : At Beginning : DemoTDL
    [Part : DemoTDL]
    
    Horizontal Alignment:Right
    Line:Empty
    invisible:Not $$InPrintMode
    Graph type:"C:\Users\Javeed\Desktop\tdlof valve fit\ALAMEEN_LOGO.jpg"
    Width : 100% screen
    Height : 12% screen
    
     
    shihab21 likes this.


  3. shihab21

    shihab21 New Member


    Thank you but it should work with if condition .let say if condition say's yes than only that tdl should work
     


  4. Maulik Patel

    Maulik Patel Active Member


    You can use "Option" or "Switch" if you want to execute code only if the condition is true.

    Code:
    [#Part: VTYP Behaviour]
    Add : Option : My VTYP Behaviour : <Your Condition>
    [!Part : MyVTYP Behaviour]
    Add:Line:At End:VTYP_ADD
     
    shihab21 likes this.


  5. shihab21

    shihab21 New Member


    im new to TDL can you help me to complete this code it could helpufull
     


Share This Page