General Discussion

  • 1.  Nested Repeatable Drel

    Adopter
    Posted 03-14-2025 19:15

    Hey Everyone,

    I'm looking to make a custom excel form and i have a Repeatable section I need details for however it is nested in another creating multiple repeatable instances.

    I know for a single repeatable it would look like

    %a[Unique level1][0], %a[Unique level1][2], %a[Unique level1][3] for example but i need to pull the multiple levels from each instance into the columns.

    Would it look like this?

    %a[TimberPlots][0]%a[TBWaypoint][0] %a[TimberPlots][0]%a[TreeSpecies][0] %a[TimberPlots][0]%a[DiameterBreastHeight][0] %a[TimberPlots][0]%a[DistanceTree][0]
    %a[TimberPlots][0]%a[TBWaypoint][1] %a[TimberPlots][0]%a[TreeSpecies][1] %a[TimberPlots][0]%a[DiameterBreastHeight][1] %a[TimberPlots][0]%a[DistanceTree][1]
    %a[TimberPlots][0]%a[TBWaypoint][2] %a[TimberPlots][0]%a[TreeSpecies][2] %a[TimberPlots][0]%a[DiameterBreastHeight][2] %a[TimberPlots][0]%a[DistanceTree][2]
    %a[TimberPlots][1]%a[TBWaypoint][0] %a[TimberPlots][1]%a[TreeSpecies][0] %a[TimberPlots][1]%a[DiameterBreastHeight][0] %a[TimberPlots][1]%a[DistanceTree][0]
    %a[TimberPlots][1]%a[TBWaypoint][1] %a[TimberPlots][1]%a[TreeSpecies][1] %a[TimberPlots][1]%a[DiameterBreastHeight][1] %a[TimberPlots][1]%a[DistanceTree][1]
    %a[TimberPlots][1]%a[TBWaypoint][2] %a[TimberPlots][1]%a[TreeSpecies][2] %a[TimberPlots][1]%a[DiameterBreastHeight][2] %a[TimberPlots][1]%a[DistanceTree][2]

    Or do i need one more set of brackets? Or am I wrong completely.



    ------------------------------
    Russell Kondro
    Wildlife and Fisheries Biologist
    Basin Environmental
    ------------------------------


  • 2.  RE: Nested Repeatable Drel

    Staff
    Posted 03-17-2025 09:20

    Hi Russell!

    We have some documentation on nested repeatable sections here: https://docs.truecontext.com/1374411/Content/Published/217831408.html#:~:text=Reference%20Nested%20Repeatable%20Sections

    We'll be adding more examples to that topic, but I hope that helps get you started.

    Best regards,

    Karen



    ------------------------------
    Karen Cann
    Technical Communications Manager
    TrueContext
    ------------------------------



  • 3.  RE: Nested Repeatable Drel

    Adopter
    Posted 03-17-2025 12:07

    Hey Karen,

    I had taken a look at your documentation etc and thats why I was trying to check the validity of my coding as the documents don't seem to fit my coded answer needs.

    Thank you



    ------------------------------
    Russell Kondro
    Wildlife and Fisheries Biologist
    Basin Environmental
    ------------------------------



  • 4.  RE: Nested Repeatable Drel

    Posted 03-17-2025 13:04

    Hello Russell,

    I hope I can help you out a little more here, going to need to start with an example to make it easier to explain:

    So in this example, I have the Main Form with a Repeat called Repeat1 and a Nested repeat called Repeat2 (inside of Repeat 1)

    Main Form
    ---> Repeat1
    --->Repeat1_Q1
    ---------->Repeat2
    ---------->Repeat2_Q1

    Now If I wanted to target the first value of Repeat2_Q1 that is in the first row of Repeat1, it would look like this:
    %e[Repeat1][0][%e[Repeat2][0][%a[Repeat2_Q1]]]

    2nd row in Repeat2
    %e[Repeat1][0][%e[Repeat2][1][%a[Repeat2_Q1]]]

    Then moving into the 2nd row of Repeat1:
    %e[Repeat1][1][%e[Repeat2][0][%a[Repeat2_Q1]]]

    I hope that helps, and let me know if you need some assistance with your specific example! 



    ------------------------------
    Ian Chamberlain
    Solutions Architect
    TrueContext
    ------------------------------



  • 5.  RE: Nested Repeatable Drel

    Adopter
    Posted 03-17-2025 16:52

    Hey Ian,

    Thank you i think that helps, based off my above example then it should look like this?

    %e[TimberPlots][0][%e[TimberDetails][0]%a[TBWaypoint][0]] %e[TimberPlots][0][%e[TimberDetails][0]%a[TreeSpecies][0]]

    For clarification "TimberPlots"  is the heading for the first repeatable section and "TimberDetails" is the unique for the nested repeatable with "TBWaypoint" and "TreeSpecies" are two of the columns I want to fill.



    ------------------------------
    Russell Kondro
    Wildlife and Fisheries Biologist
    Basin Environmental
    ------------------------------



  • 6.  RE: Nested Repeatable Drel

    Posted 03-24-2025 10:18

    Close! 

     
    %e[TimberPlots][0][%e[TimberDetails][0][%a[TBWaypoint]]]

    %e[TimberPlots][0][%e[TimberDetails][0][%a[TreeSpecies]]]

    When you are using the %e reference, you don't need the [n] after the question label because as part of your %e statement, you are defining the row you want. So these examples should pull out the first values in those questions. 
    Thank you!


    ------------------------------
    Ian Chamberlain
    Solutions Architect
    TrueContext
    ------------------------------



Reminder: Content posted to our Community is public content.  Please be careful not to post Intellectual Property that you do not have permission to share.  For more information please refer to our Terms Of Use