Visual Builder

Get Involved. Join the Conversation.

Topic

    Stephen Bryant
    Populate ADP with data and then additional rows
    Topic posted August 7, 2019 by Stephen BryantBronze Trophy: 5,000+ Points, last edited August 7, 2019, tagged Action Flows, Custom Code, Layout, UI 
    29 Views, 1 Comment
    Title:
    Populate ADP with data and then additional rows
    Summary:
    Loading a document for Edit
    Content:

    Hello,

    I have a custom edit screen in my application.

    Upon loading the page, the headers populate.

    Then the lines populate in an array based on an ADP.

    I have five rows in the ADP when it loads.  The data always loads at the end of the ADP so if you had two lines to load you end up with the following:

    1 - blank row

    2 - blank row

    3 - blank row

    4 - data

    5 - data

    I would like the data rows to load first and then the blank rows.  The blank rows provide for edit.

    Is there a way to achieve this when assigning the data to the ADP.  I know you can use Unshift in pure JavaScript but not quite sure how to do it here.

    Thanks,

    Steve

    ***Update****

    I included both rest calls in a single action chain loading the data first and then the blank rows and that is consistently working.

    Has anyone else tried this or have a different approach?

     

     

    Version:
    19.1.3

    Comment

     

    • David Konecny

      In Assignment action I'd set Reset to Empty and I would assign into the array value like this:

      $variables.dataRowArray.concat($variables.blankRowArray)
      

      -David