(Example) How Can I Map 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.



    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.



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



  • 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. On the Application Explorer screen, on the My Application pane, click Sales Invoice > Processes > Sales Invoice > Process Model > Sales Invoice.


Procedure

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


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


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


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


  5. In the Label field, enter ProductID.


  6. Click the Configuration tab.


  7. On the Configuration tab, select Mandatory.


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


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


  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.


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


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

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



  4. In the Schema Name field, select dbo.


  5. Drag InvoiceItems from Table Names to Selected Table Names.
  6. Drag SalesInvoiceRequest from Table Names to Selected Table Names.


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


    Process Data Database Column Names
    ProcessId Process_x0020_ID, AccountID
    InvoiceDate Invoice_x0020_Date
    AccountName Account_x0020_Name
    ContactPerson Point_x0020_Of_x0020_Contact
    EmailId Email_x0020_ID
    Phone Phone
    CustomerPONumber Contact_x0020_PO_x0020_Number
    CustomerPODate Customer_x0020_PO_x0020_Date
    POAmount PO_x0020_Amount
    InvoiceItems InvoiceItems
    Product Product
    Price Price
    Quantity Quantity
    TotalPrice Total_x0020_Price
    ProductID ProductID
    SubTotal SubTotal
    PaymentTerms Payment_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 icon.

    App Store
  2. In CATEGORY section, click Sales.


  3. Click Sales Invoice app.


  4. On the Sales Invoice screen, click Add.


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

    For more information, refer to Publish a process-based application.