(Example) How Can I Map a Repeating Schema Element to Data Population?

This example shows how to map a repeating schema element to data population, do the procedure in this topic.

Background and Setup

Prerequisites

  • Create 2 database tables.

    This example shows a table called SalesInvoiceRequest.

    The AccountID column name specified as a primary key. The column names specified in this table are similar to the form fields, except AccountID.


    Sales Invoice Request Table screen

    This example shows a table called Invoice Items.

    The ProductID column name specified as a primary key. The column names specified in this table are similar to the sub form fields, except ProcessID. The ProductID is a primary key so you need to add ProductID in your subform to insert the values.


    Invoice Items Table screen

    The column name Process ID is set as a foreign key constraint.


    Set foreign key screen
  • Create Data Population database access token.

    For more information, refer to Access tokens for Database.

Good to Know

Step 1: Configure the ProductID Text Box for Invoice Items Subform

To configure the ProductID text box form control, do the procedure in this topic.

How to Start

  1. Click App Builder.

    Click App Builder
  2. On the App Builder Home screen, click All Apps.

    Click All Apps
  3. On the All Apps screen, on the Sales Invoice app, click Edit Edit icon.

    Click Edit
  4. On the App Details screen, hover over the Sales Invoice process model, and click Edit Edit icon.

    Click Edit

Procedure

  1. On the Sales Invoice process, in the Sales Invoice Request activity, click Activity Settings Activity Settings icon > Edit eForm Edit eForm icon.

    Sales Invoice screen
  2. On the Invoice Items subform, click Design Subform Design Subform icon.

    Design Subform screen
  3. On the Common Controls tab, drag a Text Box Text Box icon form control onto your eForm.

    Common Controls tab
  4. On the Field Setting - Text Box screen, click the General tab.

    General tab
  5. In the Label field, enter ProductID.

    Text Box General tab
  6. Click the Configuration tab.

    Text Box Configure tab
  7. On the Configuration tab, select Mandatory.

    Text Box Configure tab
  8. To save the changes, click Close Screen Close Screen icon.
  9. The Invoice Items subform shows the ProductID text box form control.

    Invoice Items screen
  10. On the Process Builder screen, click Save Save icon.

    Process Builder Save Menu screen
  11. On the Save quick menu, click Save and Check In Save and Check In icon.

Step 2: Configure Data Population with Microsoft SQL Server

This example shows how to configure data population with Microsoft SQL Server.

Procedure

  1. In the Process Builder, click Misc Misc icon > Data Population Data Population icon.

    Process Builder screen
  2. On the Data Population screen, in the Repository list, select Microsoft SQL Server.

    Data Population screen
  3. In the Database list, select DB Token databae access token.

    To create a new access token, click Create Add Token icon. For more information, refer to Access Token for Database..


    Data Population screen
  4. In the Schema Name field, select dbo.

    Data Population screen
  5. Drag InvoiceItems from Table Names to Selected Table Names.
  6. Drag SalesInvoiceRequest from Table Names to Selected Table Names.

    Data Population screen
  7. Click Map Data.
  8. On the Schema Mapper screen, map the fields to data population.

    Data Population Schema Mapper screen
    Process DataDatabase Column Names
    ProcessIdProcess_x0020_ID, AccountID
    InvoiceDateInvoice_x0020_Date
    AccountNameAccount_x0020_Name
    ContactPersonPoint_x0020_Of_x0020_Contact
    EmailIdEmail_x0020_ID
    PhonePhone
    CustomerPONumberContact_x0020_PO_x0020_Number
    CustomerPODateCustomer_x0020_PO_x0020_Date
    POAmountPO_x0020_Amount
    InvoiceItemsInvoiceItems
    ProductProduct
    PricePrice
    QuantityQuantity
    TotalPriceTotal_x0020_Price
    ProductIDProductID
    SubTotalSubTotal
    PaymentTermsPayment_x0020_Terms

How to Get the App

This example is based on the Sales Invoice app from the AgilePoint NX App Store. Use this procedure to get the app.

Prerequisites

Good to Know

  • This procedure is optional. It is provided so you can test the example with an out-of-the-box app.
  • This is part of the Background and Setup procedures, but many users preferred this step to appear after the example, not before it.

Procedure

  1. Click App Store.

    App Store
  2. In the CATEGORY section, click Sales.

    App Store screen
  3. Click the Sales Invoice app.

    Sales Invoice screen
  4. On the Sales Invoice screen, click Add.

    Sales Invoice screen
  5. On the Trust App screen, click Trust it.
  6. Click Return to site.