Display only last four digits

Discussion in 'Free Source Codes' started by Rohit Khedar, Apr 1, 2021.

    
  1. subash pal

    subash pal Member


    Please Give me some example it becomes more helpful for me

    Thanks Again
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Code:
    DSPAccName          : if @@DSPAsName then $$Name else +
                              if @@DSPAsAlias then @@AliasName else +
                              if @@DSPAsPartNo then @@ObjPartNo else +
                              if @@DSPAsPNAlias then @@ObjPNAlias else +
                              if @@DSPAsNameAlias then @@DSPNameAlias else +
                              if @@DSPAsNamePartNo then @@DSPNamePartNo else +
                              @@DSPAccName2
    
        DSPAccName2         : if @@DSPAsAliasName then @@DSPAliasName else +
                              if @@DSPAsPartNoName then @@DSPPartNoName else +
                              if @@DSPAsPNAliasPN then @@DSPPNAliasPN else +
                              if @@DSPAsPNPNAlias then @@DSPPNPNAlias else @@DSPAccName3
    
        DSPAccName3         : if @@DSPAsNameDesc then @@DSPNameDesc else +
                              if @@DSPAsPNDesc then @@DSPPNDesc else +
                              if @@DSPAsDescName then @@DSPDescName else +
                              if @@DSPAsDescPN then @@DSPDescPN else $$Name
     


  3. subash pal

    subash pal Member


    Thanks sir for Your Support But I Can not fetch udf value as per requirement i.e. If Master Value="Bhairahawa" Then Report Value "BHW"
     


  4. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    If this is your formula........
    If Master Value="Bhairahawa" Then Report Value "BHW"

    Then it is wrong syntax.
     


  5. subash pal

    subash pal Member


    This is Not Formula I like show short udf name in report field

    for example i create a table Named "List Of Area" and List : Bhairahawa, Butwal, Kathmandu,............ then i want fetch in my sales report In Area Like BHW, BTL , KTM and So on, In excel we do simply but here it gone to very difficult for me, If any idea Please tell me with function Description, Variable Description & Field Description, Because I am not Developer , I am an Accountant, I just make normal change with help of experts team Thanks
     


  6. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Make another Field next to or below....i.e. the field that contains the table.

    In this new field........make a formula, as suggested above.........in my previous post. The syntax is given.

    I too am Accountant also with 33 Years experience, so that should not be a excuse. This is a learning site. You keep on trying and we will help you when you get stuck. So keep on coding with confidence and positive attitude.
     


  7. subash pal

    subash pal Member


    I am very Happy knowing you have 33 year experience, my age is now 34 years i have 10 years experience, I Will Try to develop Because It Save Space in Report In screen and In Paper, thanks @amit Sir and "HAPPY HINDU YEAR 2078" Among the Members
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Yes....please continue doing so.....
    practice and practice... that is the best and fast way to learn TDL.
     


  9. Bipin Damania

    Bipin Damania Active Member


    There is no such shortcut easily you can define with TDL. Simply you add one field in Ledger with UDF storage and recall that UDF in report. Or write TDL for each & every ledger short name & use the same.
     


  10. Chetan S

    Chetan S New Member


    Sir, I am trying to get only first 4 digits of HSN code for my customised invoice format.... (I want to print only first 4 digits of HSN Code in my invoice print)
    Along with the code, for HSN code I have written as below

    [Field : AD HSN Code]
    Use : Simple Field
    Set as : $HSNCell ;; $GSTItemHSNCodeEx
    Style : O9

    [System : Formula]
    HSNCell : $GSTItemHSNCodeEx
    MyCellWidth : $$StringLength:mad:@HSNCell
    MyCellL4Digits : $$StringPart:mad:@HSNCell:(@@MyCellWidth-4):4

    But the same is not giving me the required result. Please guide and show me the path to do it.
     


Share This Page