TALLYPRIME AUTO BACKUP ERROR

Discussion in 'Free Source Codes' started by RAVI BANOTH, Jul 6, 2023.

    
  1. RAVI BANOTH

    RAVI BANOTH Member


    Dear Experts,

    Please Resolve this Auto Backup Issue in TallyPrime 3.0


    Thanks & Regards
    Ravi Baoth

    Below Codes:-

    [#Form:Select Company List]
    On : Form Accept : Yes : CALL : Backup Function
    [Function: Backup Function]
    Variable : Backup Det Var: String
    00 : IF : ##EnableAutoBackup
    10 : IF : ##AutoBackupPrompt
    20 : QUERYBOX : "Backup Company ?" : Yes:No
    30 : IF : $$LastResult
    40 : CALL : Backup Company
    50 : ENDIF
    60 : ELSE :
    70 : CALL : Backup Company
    80 : ENDIF
    90 : ENDIF
    [Function: Backup Company]
    10 : SET : BackupDetVar : @@DestPath + ", " + ##SVCurrentPath + ", " + ##SVCurrentCompany + +
    ", " + @@CoNumber
    20 : BACKUP COMPANY : "," : ##BackupDetVar
    30 : SET : SVBackupPath : @@DestPath
    [System: Formula]
    DestPath : ##DestinationPath + "\" + @@DateForm + "\" + @@TimeForm
    CoNumber : $$String:($CompanyNumber:Company:##SVCurrentCompany):5
    DateForm : $$String:$$MachineDate
    TimeForm : @@HrsForm + @@MtsForm
    HrsForm : If $$StringPart:$$MachineTime:0:2 CONTAINS ":" +
    Then $$StringPart:$$MachineTime:0:1 +
    Else $$StringPart:$$MachineTime:0:2
    MtsForm : if $$StringPart:$$MachineTime:0:2 CONTAINS ":" +
    Then $$StringPart:$$MachineTime:2:2 +
    Else $$StringPart:$$MachineTime:3:2
    ;; Enable configuration options - used in General of F12 Configuration
    [#Part: System Common]
    Add : Lines : Enable Auto Backup, Auto Backup Path, Auto Backup Path Info, Auto Backup Prompt
    [Line: Enable Auto Backup]
    Field: Long Prompt, Enable Auto Backup
    Local: Field: Long Prompt : Info : $$LocaleString:"Enable Automatic Backup Feature?"
    [Field: Enable Auto Backup]
    Use : Logical Field
    Modifies : EnableAutoBackup
    [Line: Auto Backup Path]
    Field: Long Prompt, Auto Backup Path
    Local: Field: Long Prompt : Info : $$LocaleString:"Destination Path?"
    Local: Field: Long Prompt : Inactive: NOT #EnableAutoBackup
    Local: Field: Long Prompt : Indent : 2
    [Field: Auto Backup Path]
    Use : Name Field
    Modifies : DestinationPath
    Inactive : NOT #EnableAutoBackup
    Set As : If $$IsEmpty:##DestinationPath Then "D:\PrimeBackup" else ##DestinationPath
    [Line: Auto Backup Path Info]
    Field: Simple Field
    Local: Field: Simple Field : Info : $$LocaleString:"(Subfolders for System Date and Time will be created within)"
    Local: Field: Simple Field : Inactive: NOT #EnableAutoBackup
    Local: Field: Simple Field : Style : Small Italic
    Indent: 1
    [Line: Auto Backup Prompt]
    Field: Long Prompt, Auto Backup Prompt
    Local: Field: Long Prompt : Info : $$LocaleString:"Confirmation from user?"
    Local: Field: Long Prompt : Inactive: NOT #EnableAutoBackup
    Local: Field: Long Prompt : Indent : 2
    [Field: Auto Backup Prompt]
    Use : Logical Field
    Modifies : AutoBackupPrompt
    Inactive : NOT #EnableAutoBackup
    Set As : If $$IsEmpty:##AutoBackupPrompt Then Yes else ##AutoBackupPrompt
    ;; Variable Definition
    [Variable: EnableAutoBackup]
    Type : Logical
    Persistent : Yes
    [Variable: DestinationPath]
    Type : String
    Persistent : Yes
    [Variable: AutoBackupPrompt]
    Type : Logical
    Persistent : Yes
    [System: Variable]
    EnableAutoBackup: Yes
    DestinationPath : "D:\PrimeBackup"
    AutoBackupPrompt: Yes
     

    Attached Files:



  2. Mahesh Sethi

    Mahesh Sethi Member


    Hi,
    There is no issue in auto backup tdl code, try the below process :

    Open the company folder in the TallyPrime data folder, and compare the sizes of the files Company.900
    and CmpSave.900. If there is a difference in size, then:
    • Delete Company.900, and make a copy of CmpSave.900 in the same folder.
    • Rename CmpSave – Copy.900 as Company.900, as shown below:
      [​IMG]
     


  3. Sanjeev S

    Sanjeev S Active Member


    Also change

    CoNumber : $$String:($CompanyNumber:Company:##SVCurrentCompany):6
     
    RAVI BANOTH likes this.


  4. ananddanacial

    ananddanacial New Member


    Thank You !!
     


  5. RAVI BANOTH

    RAVI BANOTH Member


    Thank You Sir.
     


  6. Murali.R

    Murali.R Member


    Sir I will not understand CoNuber Please tell
     


  7. Mahesh Sethi

    Mahesh Sethi Member


    In TallyPrime rel 3.0 Company folder shuld be in 6 digits like 000001 or 000002
     


  8. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    There is an UPDATE on this code in Tally Developer - Samples folder .... use that instead, as it is much better
     


  9. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Backup for Tally ERP and Tally Prime (upto Prime release 2.1) ......
    Code attached below .....
    Code:
    [System: Event]    ;; System Events to take backup on occurence of configured event
    
        AppStartEvent    : System Start     : ##TSPLFFEBackupOn = "Tally Application Start"    : Call    : TSPL FFE Backup Function
        CmpLoadEvent    : Load Company     : ##TSPLFFEBackupOn = "Load Company"            : Call     : TSPL FFE Backup Function
        CmpCloseEvent     : Close Company    : ##TSPLFFEBackupOn = "Close Company"            : Call    : TSPL FFE Backup Function
        AppEndEvent        : System End    : ##TSPLFFEBackupOn = "Tally Application End"    : Call    : TSPL FFE Backup Function
    
    [Function: TSPL FFE Backup Function]    ;; Function checking configured conditions and invoking Backup
    
        Variable    : Backup Det Var: String
    
        00    : IF     : ##TSPLFFEEnableUCB
        10    :     IF        : ##TSPLFFEUCBPrompt
        20    :         QUERY BOX     : "Backup Company ?" : Yes:No
        30    :         IF    : $$LastResult
        40    :             CALL    : TSPL FFE Backup Company
        50    :         ENDIF
        60    :     ELSE    :
        70    :         CALL    : TSPL FFE Backup Company
        80    :     ENDIF
        90    : ENDIF
    
    [Function: TSPL FFE Backup Company]    ;; Function taking Backup using 'BACKUP COMPANY' Action
    
        Local Formula    : BackUpAllItems        : ##TSPLFFEBackupData = "All Companies"
        Local Formula    : BackUpCurCompany        : ##TSPLFFEBackupData = "Current Company"
        Local Formula    : BackUpSelCompanies    : ##TSPLFFEBackupData = "Selected Companies"
    
        00    : SET        : SVBackupPath            : @@TSPLFFEDestPath
        01    : SET        : SVBackupSrc            : if $$IsEmpty:##SVBackupSrc then ##SVCurrentPath else ##SVBackupSrc
        05    : SET        : BackupDetVar            : ##SVBackupPath + ", " + ##SVCurrentPath + ", " + ##SVCurrentCompany + +
                                                ", " + @@TSPLFFECoNumber
        10    : DO IF        : @BackUpAllItems        : BACKUP COMPANY:"":$$FullListEx:"":ListofAllBackupCompanies:##SVBackupPath:##SVBackupSrc:$Name:$CompanyNumber
        20    : DO IF        : @BackUpCurCompany        : BACKUP COMPANY:","        : ##BackupDetVar
        30    : DO IF        : @BackUpSelCompanies    : BACKUP COMPANY:"":$$FullListEx:"":TSPLFFESelBackupCompaniesSumm:##SVBackupPath:##SVBackupSrc:$Name:$CompanyNumber
    
    [Collection: TSPL FFE Sel Backup Companies] ;; Collection from List Variables
    
        Data Source    : Variable        : TSPL FFE Backup Companies
        Filter        : TSPL FFE NonZeroCompany
    
    [Collection: TSPL FFE Sel Backup Companies Summ]
    
        Source Collection    : TSPL FFE Sel Backup Companies
        By                    : Name            : $Name
        By                    : CompanyNumber    : $CompanyNumber
        Fetch                : Dest, Src
    
    [System: Formula]    ;; Formulae constructing Folder and Sub Folder Path for Backup File
    
        TSPL FFE DestPath        : ##TSPLFFEDestinationPath + "\" + @@TSPLFFEDateForm + "\" + @@TSPLFFETimeForm
        TSPL FFE CoNumber        : $$String:($CompanyNumber:Company:##SVCurrentCompany):5
        TSPL FFE DateForm        : $$String:@@TSPLFFESysDate
        TSPL FFE TimeForm        : @@TSPLFFEHrsForm + @@TSPLFFEMtsForm
    
        TSPL FFE HrsForm        : If $$StringPart:@@TSPLFFESysTime:0:2 CONTAINS ":" +
                                    Then $$StringPart:@@TSPLFFESysTime:0:1 +
                                    Else $$StringPart:@@TSPLFFESysTime:0:2
    
        TSPL FFE MtsForm        : If $$StringPart:@@TSPLFFESysTime:0:2 CONTAINS ":" +
                                    Then $$StringPart:@@TSPLFFESysTime:2:2 +
                                    Else $$StringPart:@@TSPLFFESysTime:3:2
    
        TSPL FFE SysDate        : $$SysInfo:SystemDate
        TSPL FFE SysTime        : $$SysInfo:SystemTime
    
        TSPL FFE NonZeroCompany    : $CompanyNumber != "0"
    
    
    [Report: TSPL FFE UCB Config]
    
        Title        : $$LocaleString:"Configure Backup"
        Object      : BackCmpList
    
    [Form: TSPL FFE UCB Config]
    
        Use            : System Configuration
        Delete        : Parts
        Add            : Parts    : Form SubTitle, TSPL FFE Enable UCB
        Local: Field: Form SubTitle    : Info    : "Configure Backup"
    
    ;; On saving the Form, calling a function to update the selected companies to the persistent List Variables
        On            : Form Accept    : #TSPLFFEUCBData = "Selected Companies"    : CALL    : TSPL FFE Update List Variables
    
    [Part: TSPL FFE Enable UCB]
    
        Lines    : TSPL FFE Enable UCB, TSPL FFE UCB Path, TSPL FFE UCB Path Info
        Lines    : TSPL FFE UCB On, TSPL FFE UCB Data, TSPL FFE UCB Prompt
    
        [Line: TSPL FFE Enable UCB]
    
            Field: Long Prompt, TSPL FFE Enable UCB
            Local: Field: Long Prompt : Info     : $$LocaleString:"Enable User Configured Backup Feature?"
    
            [Field: TSPL FFE Enable UCB]
    
                Use         : Logical Field
                Modifies    : TSPL FFE EnableUCB    : Yes
    
        [Line: TSPL FFE UCB Path]
    
            Field: Long Prompt, TSPL FFE UCB Path
            Local: Field: Default        : Inactive    : NOT #TSPLFFEEnableUCB
            Local: Field: Long Prompt     : Info         : $$LocaleString:"Destination Path?"
    
            [Field: TSPL FFE UCB Path]
    
                Use         : Name Field
                Modifies    : TSPL FFE DestinationPath
                Set As        : If $$IsEmpty:##TSPLFFEDestinationPath Then "C:\TallyDataBackup" else ##TSPLFFEDestinationPath
    
        [Line: TSPL FFE UCB Path Info]
    
            Fields        : Simple Field
            Local: Field: Default        : Inactive    : NOT #TSPLFFEEnableUCB
            Local: Field: Simple Field     : Info          : $$LocaleString:"(Subfolders for System Date and Time will be created within)"
            Local: Field: Simple Field     : Style       : Small Italic
            Indent        : 1
    
        [Line: TSPL FFE UCB On]
    
            Field: Long Prompt, TSPL FFE UCB On
            Local: Field: Default        : Inactive    : NOT #TSPLFFEEnableUCB
            Local: Field: Long Prompt     : Info         : $$LocaleString:"Backup On Event?"
    
            [Field: TSPL FFE UCB On]
    
                Use         : Name Field
                Modifies    : TSPL FFE BackupOn
                Table        : TSPL FFE BackupOn
                Show Table    : Always
    
        [Line: TSPL FFE UCB Data]
    
            Field: Long Prompt, TSPL FFE UCB Data
            Local: Field: Default        : Inactive    : NOT #TSPLFFEEnableUCB
            Local: Field: Long Prompt     : Info         : $$LocaleString:"Backup Data ?"
    
            [Field: TSPL FFE UCB Data]
    
                Use         : Name Field
                Modifies    : TSPL FFE BackupData
                Table        : TSPL FFE BackupData    : #TSPLFFEUCBOn CONTAINS "Company"
                Table        : TSPL FFE BackupDataAC    : #TSPLFFEUCBOn CONTAINS "Tally Application"
                Set As        : If $$IsEmpty:##TSPLFFEBackupData Then "All Companies" else ##TSPLFFEBackupData
                Show Table    : Always
    
    ;; Invoke a Sub Form to display list of companies for selection
                Sub Form    : TSPL FFE SV Backup    : $$Value = "Selected Companies"
    
        [Line: TSPL FFE UCB Prompt]
    
            Field: Long Prompt, TSPL FFE UCB Prompt
            Local: Field: Default        : Inactive    : NOT #TSPLFFEEnableUCB
            Local: Field: Long Prompt     : Info         : $$LocaleString:"Confirmation from user?"
    
            [Field: TSPL FFE UCB Prompt]
    
                Use         : Logical Field
                Modifies    : TSPL FFE UCBPrompt
                Set As        : If #TSPLFFEUCBOn = "Tally Application End" then No Else If $$IsEmpty:##TSPLFFEUCBPrompt Then Yes else ##TSPLFFEUCBPrompt
                Set Always    : Yes
                Skip On        : #TSPLFFEUCBOn = "Tally Application End"
    
    ;; Sub Form for List of Companies
    
    [Report: TSPL FFE SV Backup]
    
        Use        : SV Backup
        Local    : Form    : SV Backup        : Delete    : On
        Local    : Part    : Backup Title    : Delete    : Lines        : Backup Destination
        Local    : Part    : SV Backup        : Set as    : $$ListCount:TSPLFFEBackupCompanies
        Local    : Field    : Backup Name    : Delete    : Table
        Local    : Field    : Backup Name    : Add        : Table        : List of All Backup Companies                : $$Line = 1
        Local    : Field    : Backup Name    : Add        : Table        : List of All Backup Companies, End of List : $$Line > 1
        Local    : Field    : Backup Name    : Set As    : ##TSPLFFEBackupCompanies[$$Line].Name
        Local    : Field    : Backup Dest    : Set As    : ##TSPLFFEBackupCompanies[$$Line].Dest
        Local    : Field    : Backup Src    : Set As    : ##TSPLFFEBackupCompanies[$$Line].Src
    
    ;; Function to update List Variables for Backing up Selected Companies
    
    [Function: TSPL FFE Update List Variables]
    
        00    : LIST DELETE    : TSPL FFE Backup Companies
        10    : WALKCOLLECTION: BackupCmp
        20    :     LIST ADD EX    : TSPL FFE Backup Companies
        30    :     SET            : TSPL FFE Backup Companies[$$LoopIndex].Name            : $Name
        40    :     SET            : TSPL FFE Backup Companies[$$LoopIndex].CompanyNumber    : $CompanyNumber
        50    :     SET            : TSPL FFE Backup Companies[$$LoopIndex].Dest            : $Dest
        60    :     SET            : TSPL FFE Backup Companies[$$LoopIndex].Src            : $Src
        70    : END WALK
    
    ;; Table Definition
    
    [Table: TSPL FFE BackupOn]
    
        List Name    : "Tally Application Start", "Load Company", "Close Company", "Tally Application End"
        Title        : "Backup On Event"
    
    [Table: TSPL FFE BackupData]
    
        List Name    : "All Companies", "Current Company", "Selected Companies"
        Title        : "Backup"
    
    [Table: TSPL FFE BackupDataAC]
    
        List Name    : "All Companies", "Selected Companies"
        Title        : "Backup"
    
    ;; Variable Definition
    
    [Variable: TSPL FFE EnableUCB]
    
        Type        : Logical
        Persistent    : Yes
    
    [Variable: TSPL FFE DestinationPath]
    
        Type        : String
        Persistent    : Yes
    
    [Variable: TSPL FFE BackupOn]
    
        Type        : String
        Persistent    : Yes
    
    [Variable: TSPL FFE BackupData]
    
        Type        : String
        Persistent    : Yes
    
    [Variable: TSPL FFE UCBPrompt]
    
        Type        : Logical
        Persistent    : Yes
    
    [Variable: TSPL FFE Backup Companies]
    
        Variable    : Name            : String
        Variable    : CompanyNumber    : String
        Variable    : Dest            : String
        Variable    : Src            : String
        Persistent    : Yes
    
    [System: Variable]
    
        TSPL FFE EnableUCB            : No
        TSPL FFE DestinationPath    : "C:\TallyDataBackup"
    
        TSPL FFE BackupOn            : "Tally Application End"
        TSPL FFE BackupData            : "All Companies"
        TSPL FFE UCBPrompt            : No
    
        List Variable                : TSPL FFE Backup Companies
    
    ;; End-of-File
    
     
    VRS likes this.


  10. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Backup for Tally Prime -- release 3.0 onwards ......
    Code attached below .....

    Code:
    [System: Event]    ;; System Events to take backup on occurence of configured event
    
        AppStartEvent    : System Start     : ##TSPLFFEBackupOn = "Tally Application Start"    : Call    : TSPL FFE Backup Function
        CmpLoadEvent    : Load Company     : ##TSPLFFEBackupOn = "Load Company"            : Call     : TSPL FFE Backup Function
        CmpCloseEvent     : Close Company    : ##TSPLFFEBackupOn = "Close Company"            : Call    : TSPL FFE Backup Function
        AppEndEvent        : System End    : ##TSPLFFEBackupOn = "Tally Application End"    : Call    : TSPL FFE Backup Function
    
    [Function: TSPL FFE Backup Function]    ;; Function checking configured conditions and invoking Backup
    
        Variable    : Backup Det Var: String
    
        00    : IF     : ##TSPLFFEEnableUCB
        10    :     IF        : ##TSPLFFEUCBPrompt
        20    :         QUERY BOX     : "Backup Company ?" : Yes:No
        30    :         IF    : $$LastResult
        40    :             CALL    : TSPL FFE Backup Company
        50    :         ENDIF
        60    :     ELSE    :
        70    :         CALL    : TSPL FFE Backup Company
        80    :     ENDIF
        90    : ENDIF
    
    [Function: TSPL FFE Backup Company]    ;; Function taking Backup using 'BACKUP COMPANY' Action
    
        Local Formula    : BackUpAllItems        : ##TSPLFFEBackupData = "All Companies"
        Local Formula    : BackUpCurCompany        : ##TSPLFFEBackupData = "Current Company"
        Local Formula    : BackUpSelCompanies    : ##TSPLFFEBackupData = "Selected Companies"
    
        00    : SET        : SVBackupPath            : @@TSPLFFEDestPath
        01    : SET        : SVBackupSrc            : if $$IsEmpty:##SVBackupSrc then ##SVCurrentPath else ##SVBackupSrc
        05    : SET        : BackupDetVar            : ##SVBackupPath + ", " + ##SVCurrentPath + ", " + ##SVCurrentCompany + +
                                                ", " + @@TSPLFFECoNumber
        10    : DO IF        : @BackUpAllItems        : BACKUP COMPANY:"":$$FullListEx:"":ListofAllBackupCompanies:##SVBackupPath:##SVBackupSrc:$Name:$CompanyNumber
        20    : DO IF        : @BackUpCurCompany        : BACKUP COMPANY:","        : ##BackupDetVar
        30    : DO IF        : @BackUpSelCompanies    : BACKUP COMPANY:"":$$FullListEx:"":TSPLFFESelBackupCompaniesSumm:##SVBackupPath:##SVBackupSrc:$Name:$CompanyNumber
    
    [Collection: TSPL FFE Sel Backup Companies] ;; Collection from List Variables
    
        Data Source    : Variable        : TSPL FFE Backup Companies
        Filter        : TSPL FFE NonZeroCompany
    
    [Collection: TSPL FFE Sel Backup Companies Summ]
    
        Source Collection    : TSPL FFE Sel Backup Companies
        By                    : Name            : $Name
        By                    : CompanyNumber    : $CompanyNumber
        Fetch                : Dest, Src
    
    [System: Formula]    ;; Formulae constructing Folder and Sub Folder Path for Backup File
    
        TSPL FFE DestPath        : ##TSPLFFEDestinationPath + "\" + @@TSPLFFEDateForm + "\" + @@TSPLFFETimeForm
        TSPL FFE CoNumber        : $$String:($CompanyNumber:Company:##SVCurrentCompany):6
        TSPL FFE DateForm        : $$String:@@TSPLFFESysDate
        TSPL FFE TimeForm        : @@TSPLFFEHrsForm + @@TSPLFFEMtsForm
    
        TSPL FFE HrsForm        : If $$StringPart:@@TSPLFFESysTime:0:2 CONTAINS ":" +
                                    Then $$StringPart:@@TSPLFFESysTime:0:1 +
                                    Else $$StringPart:@@TSPLFFESysTime:0:2
    
        TSPL FFE MtsForm        : If $$StringPart:@@TSPLFFESysTime:0:2 CONTAINS ":" +
                                    Then $$StringPart:@@TSPLFFESysTime:2:2 +
                                    Else $$StringPart:@@TSPLFFESysTime:3:2
    
        TSPL FFE SysDate        : $$SysInfo:SystemDate
        TSPL FFE SysTime        : $$SysInfo:SystemTime
    
        TSPL FFE NonZeroCompany    : $CompanyNumber != "0"
    
    [Report: TSPL FFE UCB Config]
    
        Title        : $$LocaleString:"Configure Backup"
        Object      : BackCmpList
    
    [Form: TSPL FFE UCB Config]
    
        Use            : System Configuration
        Delete        : Parts
        Add            : Parts    : Form SubTitle, TSPL FFE Enable UCB
        Local: Field: Form SubTitle    : Info    : "Configure Backup"
    
    ;; On saving the Form, calling a function to update the selected companies to the persistent List Variables
        On            : Form Accept    : #TSPLFFEUCBData = "Selected Companies"    : CALL    : TSPL FFE Update List Variables
    
    [Part: TSPL FFE Enable UCB]
    
        Lines    : TSPL FFE Enable UCB, TSPL FFE UCB Path, TSPL FFE UCB Path Info
        Lines    : TSPL FFE UCB On, TSPL FFE UCB Data, TSPL FFE UCB Prompt
    
        [Line: TSPL FFE Enable UCB]
    
            Field: Long Prompt, TSPL FFE Enable UCB
            Local: Field: Long Prompt : Info     : $$LocaleString:"Enable User Configured Backup Feature?"
    
            [Field: TSPL FFE Enable UCB]
    
                Use         : Logical Field
                Modifies    : TSPL FFE EnableUCB    : Yes
    
        [Line: TSPL FFE UCB Path]
    
            Field: Long Prompt, TSPL FFE UCB Path
            Local: Field: Default        : Inactive    : NOT #TSPLFFEEnableUCB
            Local: Field: Long Prompt     : Info         : $$LocaleString:"Destination Path?"
    
            [Field: TSPL FFE UCB Path]
    
                Use         : Name Field
                Modifies    : TSPL FFE DestinationPath
                Set As        : If $$IsEmpty:##TSPLFFEDestinationPath Then "C:\TallyPrimeDataBackup" else ##TSPLFFEDestinationPath
    
        [Line: TSPL FFE UCB Path Info]
    
            Fields        : Simple Field
            Local: Field: Default        : Inactive    : NOT #TSPLFFEEnableUCB
            Local: Field: Simple Field     : Info          : $$LocaleString:"(Subfolders for System Date and Time will be created within)"
            Local: Field: Simple Field     : Style       : Small Italic
            Indent        : 1
    
        [Line: TSPL FFE UCB On]
    
            Field: Long Prompt, TSPL FFE UCB On
            Local: Field: Default        : Inactive    : NOT #TSPLFFEEnableUCB
            Local: Field: Long Prompt     : Info         : $$LocaleString:"Backup On Event?"
    
            [Field: TSPL FFE UCB On]
    
                Use         : Name Field
                Modifies    : TSPL FFE BackupOn
                Table        : TSPL FFE BackupOn
                Show Table    : Always
    
        [Line: TSPL FFE UCB Data]
    
            Field: Long Prompt, TSPL FFE UCB Data
            Local: Field: Default        : Inactive    : NOT #TSPLFFEEnableUCB
            Local: Field: Long Prompt     : Info         : $$LocaleString:"Backup Data ?"
    
            [Field: TSPL FFE UCB Data]
    
                Use         : Name Field
                Modifies    : TSPL FFE BackupData
                Table        : TSPL FFE BackupData    : #TSPLFFEUCBOn CONTAINS "Company"
                Table        : TSPL FFE BackupDataAC    : #TSPLFFEUCBOn CONTAINS "Tally Application"
                Set As        : If $$IsEmpty:##TSPLFFEBackupData Then "All Companies" else ##TSPLFFEBackupData
                Show Table    : Always
    
    ;; Invoke a Sub Form to display list of companies for selection
                Sub Form    : TSPL FFE SV Backup    : $$Value = "Selected Companies"
    
        [Line: TSPL FFE UCB Prompt]
    
            Field: Long Prompt, TSPL FFE UCB Prompt
            Local: Field: Default        : Inactive    : NOT #TSPLFFEEnableUCB
            Local: Field: Long Prompt     : Info         : $$LocaleString:"Confirmation from user?"
    
            [Field: TSPL FFE UCB Prompt]
    
                Use         : Logical Field
                Modifies    : TSPL FFE UCBPrompt
                Set As        : If #TSPLFFEUCBOn = "Tally Application End" then No Else If $$IsEmpty:##TSPLFFEUCBPrompt Then Yes else ##TSPLFFEUCBPrompt
                Set Always    : Yes
                Skip On        : #TSPLFFEUCBOn = "Tally Application End"
    
    ;; Sub Form for List of Companies
    
    [Report: TSPL FFE SV Backup]
    
        Use        : SV Backup
        Local    : Form    : SV Backup        : Delete    : On
        Local    : Part    : Backup Title    : Delete    : Lines        : Backup Destination
        Local    : Part    : SV Backup        : Set as    : $$ListCount:TSPLFFEBackupCompanies
        Local    : Field    : Backup Name    : Delete    : Table
        Local    : Field    : Backup Name    : Add        : Table        : List of All Backup Companies                : $$Line = 1
        Local    : Field    : Backup Name    : Add        : Table        : List of All Backup Companies, End of List : $$Line > 1
        Local    : Field    : Backup Name    : Set As    : ##TSPLFFEBackupCompanies[$$Line].Name
        Local    : Field    : Backup Dest    : Set As    : ##TSPLFFEBackupCompanies[$$Line].Dest
        Local    : Field    : Backup Src    : Set As    : ##TSPLFFEBackupCompanies[$$Line].Src
    
    ;; Function to update List Variables for Backing up Selected Companies
    
    [Function: TSPL FFE Update List Variables]
    
        00    : LIST DELETE    : TSPL FFE Backup Companies
        10    : WALKCOLLECTION: BackupCmp
        20    :     LIST ADD EX    : TSPL FFE Backup Companies
        30    :     SET            : TSPL FFE Backup Companies[$$LoopIndex].Name            : $Name
        40    :     SET            : TSPL FFE Backup Companies[$$LoopIndex].CompanyNumber    : $CompanyNumber
        50    :     SET            : TSPL FFE Backup Companies[$$LoopIndex].Dest            : $Dest
        60    :     SET            : TSPL FFE Backup Companies[$$LoopIndex].Src            : $Src
        70    : END WALK
    
    ;; Table Definition
    
    [Table: TSPL FFE BackupOn]
    
        List Name    : "Tally Application Start", "Load Company", "Close Company", "Tally Application End"
        Title        : "Backup On Event"
    
    [Table: TSPL FFE BackupData]
    
        List Name    : "All Companies", "Current Company", "Selected Companies"
        Title        : "Backup"
    
    [Table: TSPL FFE BackupDataAC]
    
        List Name    : "All Companies", "Selected Companies"
        Title        : "Backup"
    
    ;; Variable Definition
    
    [Variable: TSPL FFE EnableUCB]
    
        Type        : Logical
        Persistent    : Yes
    
    [Variable: TSPL FFE DestinationPath]
    
        Type        : String
        Persistent    : Yes
    
    [Variable: TSPL FFE BackupOn]
    
        Type        : String
        Persistent    : Yes
    
    [Variable: TSPL FFE BackupData]
    
        Type        : String
        Persistent    : Yes
    
    [Variable: TSPL FFE UCBPrompt]
    
        Type        : Logical
        Persistent    : Yes
    
    [Variable: TSPL FFE Backup Companies]
    
        Variable    : Name            : String
        Variable    : CompanyNumber    : String
        Variable    : Dest            : String
        Variable    : Src            : String
        Persistent    : Yes
    
    [System: Variable]
    
        TSPL FFE EnableUCB            : No
        TSPL FFE DestinationPath    : "C:\TallyPrimeDataBackup"
    
        TSPL FFE BackupOn            : "Tally Application End"
        TSPL FFE BackupData            : "All Companies"
        TSPL FFE UCBPrompt            : No
    
        List Variable                : TSPL FFE Backup Companies
    
    ;; End-of-File
    
     
    Vashisth and VRS like this.


  11. Rajsrisrimal

    Rajsrisrimal Member


    Thank You in Advance Amit ji, but from where to do setup, as after loading TDL , not getting option for setup the backup terms.
     
    Last edited: Aug 2, 2023
    VRS likes this.


  12. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    [#Menu : Gateway of Tally]
    Add : Item: Before: @@LocLedger : Backups : Display : TSPL FFE UCB Config
     


  13. udaya

    udaya Active Member


    Great amith sir..... thanks lot...
     


  14. Rajsrisrimal

    Rajsrisrimal Member


    Amit sir, thank you for the fast response, unbelievable
    but sir we are unable to edit the terms, please check it's only displaying, My suggestion if the same can set somewhere @ configure after features
     


  15. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    replace menu word "display" with execute
     
    Mahesh Sethi likes this.



  16. On realease 4.0 show like this error sir on Backup for Tally Prime -- release 3.0 onwards ......
    upload_2024-1-9_10-23-49.png
     


  17. Deepak K Swain

    Deepak K Swain New Member


    I think if In Folder if there company starting with 0 then it has problems. if u change 0 to 1 means if compnay name is 010031 it will not execute our progrmme. u have to replace first 0 to any number i.e. 110031, 210031,310031
     


Share This Page