IF condition in System : Formulae

Discussion in 'Tally Developer' started by Rupal Agarwal, Sep 30, 2021.

    
  1. Rupal Agarwal

    Rupal Agarwal Member


    hello everyone
    I am currently learning tally tdl development and I want to understand the basic condition of how IF condition works under system : formale.

    For example, I want to make a tdl for narration like

    If my narration is empty ($$isempty:$narration) then it will show an error like "no narration is entered'
    BUT it will not show the error if that narration contains some words like:
    "Cash", "cheque", ""bill"
    If these words are available in narration, then is will not show the error, otherwise it will show the error of entering the correct narration.

    Or

    It can also be done as if #VCHNarration is min :4 then it will show the error
    like narration field contains minimum 4 characters then it will not show the error

    both options are very helpful for me

    thank you so much in advance:oops:

    my code :

    Code:
    [#Field: VCH Narration]
        Control : ERROR : @@NARVAL
    
    [System : Formulae]
        ERROR : "ERROR !!"+$$NewLine+$$NewLine+"'' No narration entered ''"
        NARVAL : $$ISEMPTY:$Narration ;not contains "cash"
    
     


  2. Himanshu-2002

    Himanshu-2002 Active Member


    Do it like This

    NARVAL: $$IsEmpty:$$Value
     
    Rupal Agarwal likes this.


  3. Rupal Agarwal

    Rupal Agarwal Member


    not working
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    your above code should be working, nothing wrong with it.
     
    Rupal Agarwal likes this.


  5. Amit Kamdar

    Amit Kamdar Administrator Staff Member



  6. Rupal Agarwal

    Rupal Agarwal Member


    Hello sir

    Sir its working, but I want that if narration if empty or does not have specific words like cash or bill then only it will chow the error.
    If my narration contains cash or bill then only it will not show this error.
     


  7. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    use ....e.g. $Narration NOT Contains "Cash".........

    Search "CONTAINS" in developer and learn how to implement it............... you can do it.
     


  8. Rupal Agarwal

    Rupal Agarwal Member


    NARVAL : $$ISEMPTY:$Narration or $Narration NOT Contains "Cash"

    sir like this??
     


  9. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    yes.......
     


Share This Page