Repeat 2 Fields over different collections - Solved

Discussion in 'Requests' started by Sai Vineeth, Feb 24, 2022.

    
  1. Sai Vineeth

    Sai Vineeth Active Member


    Code:
    [Part : LISTOFLEDGER]
        Line : LISTOFLEDGER
        Repeat :LISTOFLEDGER : CUSTOMLEDGERCOLL
        Scroll : Vertical
    [Line: LISTOFLEDGER]
        LEFTFIELDS: RepeatField1,RepeatField2
        Repeat :RepeatField1 : InnterestCollection
        Repeat :RepeatField2 : LanguageName
        Scroll : Vertical
    
    [Field : RepeatField1]
        Fields:SubFields
    
    [Field : RepeatField2]
        Fields:SubFields2
    I want this to create Custom XML reports - Ex: : https://documenter.getpostman.com/view/13855108/TzeRpAMt#9e70491d-7156-4e93-a6f8-97ac84a5d4c6

    In above xml I am trying to repeat multiple fields Interestcollection,Languagename and closingvalues
    its repeating correctly for only first Field
     


  2. balajimg

    balajimg Active Member


    you can repeat only one field in one particular line
     


  3. Sai Vineeth

    Sai Vineeth Active Member


    Any workaround to repeat over multiple collections
     


  4. balajimg

    balajimg Active Member


    use two parts
     


  5. Sai Vineeth

    Sai Vineeth Active Member


    I am using This TDL in XML
    Expected response
    Code:
    <Ledger>
    <LanguageName.List>
    ...
    <LanguageName.List>
    <InterestCollection.List>
    ...
    </InnterestCollection>
    </Ledger>
    
    If I use multiple parts I am getting
    Code:
    <Ledger>
    ...
    </Ledger>
    <LanguageName.List>
    ...
    <LanguageName.List>
    <InterestCollection.List>
    ...
    
    </InnterestCollection>
    
     


  6. Sai Vineeth

    Sai Vineeth Active Member


    Found Solution
    Using Option and Repeating Multiple Lines
    Code:
    [Part : LISTOFLEDGER]
        Line : LISTOFLEDGER
        Repeat :LISTOFLEDGER : CUSTOMLEDGERCOLL
        Scroll : Vertical
    [Line: LISTOFLEDGER]
        LEFTFIELDS: Field1,Field2
        OPTION :Subline1 : $$NumItems:ColName >0
    [!Line: Subline1]
        Fields:  RepeatField
        Repeat :RepeatField:ColName
        Scroll : Vertical
    
    [Field : Field1]
        Fields:SubFields
    
    [Field : RepeatField]
        Fields:SubFields1,SubFields2
     
    naren1234 likes this.


Share This Page