Line Item Grid Parameters

Overview

This topic provides content for request attributes, objects and parameters that are specific to transaction Line Item Grids. It includes information for the following items:

Administration

ClosedLine Item Grid Composite State Attribute

This attribute provides a simpler way to view a line item grid attribute's state and determine its visibility (i.e. hidden, shown, read-only) through interact calls. Refer to Interact Parameters for interact call information.

Previously, the state of line item attributes displayed as columns was determined for each line item included in the line item grid. The consumer had to loop over all the line items when an attribute's visibility was dynamically changed through auto-update rules in order to determine if a line item attribute and its column should be displayed in the line item grid. Additionally, when a Transaction did not have any line items, the line attribute state information was not provided in the REST response. Therefore, the entire line item grid was hidden because the default visibility for the line item grid attributes could not be determined.

By having a single composite state parameter for an attribute that reflects its visibility for all line items, the consumer can call Transaction REST services more efficiently. In addition, a line item grid state object including the composite hidden state of attributes is provided even when there are not any line items in the response.

The "attributes" object is in the "_state" object for the Transaction line item collection. As shown in the following sample, "lineItem" contains an "attributes" object within the "_state" object, and the "visible" property for "annualValue_l" is set to "false". This indicates that the "annualValue_l" column is hidden for the line item grid.

ClosedResponse Body Sample

When the visible property of a composite attribute is set to "false" that attribute is hidden across all rows. If the visible property of a composite attribute is set to "true", then the visibility of values within the column are determined by the individual line item properties.


ClosedHierarchy Parameters

Hierarchy Search and Sort

These parameters expands upon the current line item grid filter and sort web services to support relationship integrity for hierarchical BOM products. REST services now support standard and hierarchy search queries.

Search Behavior

  • Standard search - Only the line items that match the search criteria will be returned. Parent items that do not match the search criteria will not be included in response.
  • Hierarchy search – If a child line item matches the search criteria, the matched item and the parent items are returned. Parent items will be included in the response even when the parent line item does not match the search criteria.

Sort Behavior

  • Hierarchy sort – Line items are sorted in hierarchical order using the orderby criteria. Parent items are sorted by the orderby criteria, and then child items are listed recursively under their respective parent item.
Enable Hierarchy Query Parameter

The enableHierarchy parameter allows customers to specify if a search query is standard or hierarchical. "enableHierarchy" is a Boolean value, when the value is:

  • true – hierarchical search and sort behaviors are enabled.

    "hierarchy_match_status" and "hierarchy_depth" properties are included in the response.

  • false – standard search and sort behaviors are used.

    "hierarchy_match_status" and "hierarchy_depth" properties are not included in the response.

    This is the default value, which means if "enableHierarchy" is not specified in the request body standard search and sort behaviors are used

Hierarchy Match Status Response Property

The hierarchy_match_status property indicates if a line item or child line item matches the search criteria. Administrators can reference this information to define the appearance of these items for the UI display.

  • "M" - this line item matches the search criteria.
  • "C" - this line item is a child or grandchild of a line item that matches the search criteria.
Hierarchy Depth Response Property

The hierarchyDepth parameter identifies the hierarchical level of the line item. This information can be used to specify leading indentation for hierarchical items, and is helpful for pagination. If the first line item on a new page is not a root item, the leading indent can indicate the depth of the line item in the product hierarchy. For hierarchy line items, the root item: depth = 0, first level child: depth = 1, etc.

ClosedRequest Body Sample

{
  "criteria": {
    "fields": ["formulaContains"],
    "state": false,
    "childDefs": [{
      "name": "lineItem",
      "queryDef": {
      "state": true,
      "orderby": ["_price_quantity"],
      "q": "{\"_price_quantity\":{\"$gt\":2} }",
      "fields": ["_price_quantity", "_part_number", "_sequence_number", "_document_number"],
      "enableHierarchy": true
      }
    }
  ]
}

ClosedSample Response


ClosedSelection Parameter

The Selection parameter is used in the REST call request body to select transaction lines. This parameter can be used for transaction level actions that support line selection.

Selection items are an array of {subDocVarName}/{subDocNumber} combinations.

{"selections": ["transactionLine/2", "transactionLine/3"]}

Related Topics

Related Topics Link IconSee Also