Skip to main content

 –

addListItem

Suggest edit Updated on December 1, 2021

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

Signature

addListItem(options)

Returns

Not applicable.

Parameters

NameDescriptionTypeRequired
targetSpecifies 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
positionSpecifies 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
eventSpecifies the event that launches the activity.DOM event object
detailFlowActionSpecifies the flow action that displays the UI for the new item.StringRequired when the target parameter is set to RDL
templateSpecifies the template in which to display the detailFlowAction. The default value is pyNextGenGridModalTemplate.StringRequired when the target parameter is set to RDL
dataPageSpecifies 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
dataPageResultsClassSpecifies the name of the class of the page specified in the dataPage parameter. StringRequired when dataPage parameter is set
For example:
 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? YesNo

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us