LinkedIn
Copied!

Table of Contents

addListItem

Version:

Only available versions of this content are shown in the dropdown

Adds a new item to a table or a repeating dynamic layout.

Signature

addListItem(options)

Returns

Not applicable.

Parameters

Name Description Type Required
target Specifies the name of the target table, hierarchical list, hierarchical table, or a repeating dynamic layout. The following values are available:
  • pega.api.ui.constants.GRID: The target is a table, tree, or a hierarchical table.
  • pega.api.ui.constants.RDL: The target is a repeating dynamic layout.
Constant
position Specifies where the system adds the new row. The following values are available:
  • For target set to GRID, the available values are after and before. The positions are relative to the active row.
  • For target set to RDL, the available values are first and last.
Constant
event Specifies the event that launches the activity. DOM event object
detailFlowAction Specifies the flow action that displays the UI for the new item. String Required when the target parameter is set to RDL
template Specifies the template in which to display the detailFlowAction. The default value is pyNextGenGridModalTemplate. String Required when the target parameter is set to RDL
dataPage Specifies the name of the data page associated with the table or the repeating dynamic layout. When left empty, the event object identifies the target layout or table. String
dataPageResultsClass Specifies the name of the class of the page specified in the dataPage parameter. String Required when dataPage parameter is set
 var options = {
                    target:  pega.api.ui.constants.GRID / pega.api.ui.constants.RDL,
                    position: "sPosition",
                    event: eventObject,
                    detailFlowAction: 'flowActionName',
                    template: "templateName",
                    dataPage: "dataPageName" ,
                    dataPageResultsClass: 'className'  
                };

                pega.api.ui.actions.list.addListItem(options);
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.