Populate Adaptive Form Table with the results of Form Data Model Service Invocation

Live form is hosted here
In this article we take a look at populating adaptive forms table by fetching data from form data model service invocation. We are going to create an amortization schedule in a table that lists each regular payment on a mortgage over time. The amortization results are returned by our Form Data Model. The Form Data Model’s service is invoked on the click event of calculate button as shown in the screenshot. The input and the output parameters of the service invocation are mapped appropriately as shown in the screen shot. The output is mapped to the columns of Row1
clickevent

Row1 is configured to be grow depending on the data returned by the service call. Notice the repeat settings that are specified here. A value of -1 indicates unlimited number of rows in the table
Row1

Deploy this on your server

Install Tomcat as specified here
Deploy the SampleRest.war file
Install the assets using AEM package manager
Open the Amortization Schedule Form
Enter the appropriate value and click on calculate
Amortization Schedule should get populated in your form

On this page