Automate

 View Only
  • 1.  Index Distortion Issue in Nested Repeating Table After Row Deletion

    Posted 08-21-2025 14:17
      |   view attached

    Hi,

    I have a form that contains a nested repeating table. When a row from the nested table is deleted from the UI, the indexes referencing the rows within the nested repeating loop become distorted behind the scenes.

    Since JavaScript is used to loop through the table rows, these indexing issues are causing values to shift incorrectly. Could you please let me know if there's a proper way to correct or reset the indexing?

    Regards,
    Shylaja



    ------------------------------
    Shylaja Manickam
    SAP Technical Consultant
    HF Sinclair Corporation
    TX
    ------------------------------


  • 2.  RE: Index Distortion Issue in Nested Repeating Table After Row Deletion

    Employee
    Posted 08-22-2025 19:53

    Hi Shylaja

    When I first saw this posted, I thought - not me! :)  I'm not a big JavaScript developer. 

    Are you stating that if you delete a row, the indexes are not aligned?  If so, could you use a row number that is in the form?

    I set one for the top table - the "header" if you will

    then set the row number for the nested table aka line items

    Here's my test nested table

    I'm deleting the 2nd line item row in the first "document", and when I do, the row number is corrected.

    Now it looks like this - correcting the 3rd row to now be the 2nd row.

    I realize for JavaScript, you start with "0" instead of 1, so perhaps you could subtract 1 from the row number for the index?

    Is this the issue?  Could this work for you?

    Best Regards,

    Sigrid



    ------------------------------
    Sigrid Kok
    *Precisely Software Inc.
    ------------------------------