Import requests - Xml Response Modification

Discussion in 'Tally Integration' started by sriharisivaraj, Feb 11, 2022.

    
  1. sriharisivaraj

    sriharisivaraj New Member


    Hi,

    I have written a tdl to tranform the tally default xml response on importing masters or vouchers in to tally.

    Below is the code snippet

    [#Import File: All Masters]
    Option : TSPL Smp Custom Response Report
    [#Import File: Vouchers]
    Option : TSPL Smp Custom Response Report
    [!Import File: TSPL Smp Custom Response Report]

    Add : On : Start Import : Yes : Call : StartingImport
    Add : On : After Import Object : Yes : Call : CustomResp : "after record import"
    Add : On : End Import : Yes : Call : OnEndImportFunction : "Ending Import"

    Response Report : TSPL Smp ResponseRpt

    [System: Variable]
    List Variable : ImportedRecordDetails
    Variable : LogCounter : Number
    [Variable: ImportedRecordDetails]
    Variable : Name : String
    Variable : AlterId : Number
    Variable : MasterId : Number
    Variable : Error : String

    [Function: StartingImport]
    771 : SET FILE LOG ON
    772 : Log : "Starting Data Import"


    It is working as expected, but is there a way to restrict this response only for specified import requests based on any specific tag, rather than providing the custom made response for all import requests done by other third party syncs.
     


  2. Sai Vineeth

    Sai Vineeth Active Member


    Mention yourcondition after Option : TSPL Smp Custom Response Report
    like
    Code:
    Option : TSPL Smp Custom Response Report : #I45Id = "G"
    to enable only for Group
     


Share This Page