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:
- The Line Item Grid Composite Attribute provides a method to view the line item grid attributes state and determine its visibility.
- Hierarchy Parameters provides information to manage hierarchical objects. It includes the following items: hierarchy search and sort parameters, the enable hierarchy query parameter, the hierarchy match status property, and the hierarchy depth property.
- The Line Selection Parameter provides a method to select specific transaction lines.
Administration
Line 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.
{ "documents": { "lineItem": { "_state": { "attributes": { "annualValue_l": { "visible": false } } } } } }
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.
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.
{ "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 } } ] }
{ "destinationURL": "", "documents": { "formulaContains": null, "lineItem": { "hasMore": false, "_state": { "insertable": true, "queryable": true, "sortable": true, "defaultRowState": { "updatable": true, "deletable": true, "hasError": false, "actions": { "readOnlyOutputsSubDoc": { "enabled": true, "visible": true }, "subParentPageDestination": { "enabled": true, "visible": true }, "subdocAdvancedAddFromParts": { "enabled": true, "visible": true }, "subdocdisplayHistoryModify": { "enabled": true, "visible": true }, "modifyWithoutSavingOrValidatingSubDoc": { "enabled": true, "visible": true }, "_reconfigure_inbound_action": { "enabled": true, "visible": true }, "subdocdisplayHistory": { "enabled": true, "visible": true }, "_calculate_price_action": { "enabled": true, "visible": true }, "revertToDefaultSubDoc": { "enabled": true, "visible": true }, "subPrintSaveDocumentUponPrinting": { "enabled": true, "visible": true }, "documentViewsSubDoc": { "enabled": true, "visible": true }, "refreshSubDoc": { "enabled": true, "visible": true }, "modifyTabBMLSubDoc": { "enabled": true, "visible": true }, "advancedModifyBeforeFormulasSubDoc": { "enabled": true, "visible": true }, "subdocback": { "enabled": true, "visible": true }, "returnToSavedSubDocHidingRules": { "enabled": false, "visible": false }, "hideHidingRuleOutputsByStepSubDoc": { "enabled": true, "visible": true }, "simpleValidationsSubDoc": { "enabled": true, "visible": true }, "addFromCatalogSubDoc": { "enabled": true, "visible": true }, "subCustomPageDestination": { "enabled": true, "visible": true }, "subDocexportAttachment": { "enabled": true, "visible": true }, "_reconfigure_action": { "enabled": true, "visible": true }, "advancedValidationsSubDoc": { "enabled": true, "visible": true }, "modify": { "enabled": true, "visible": true }, "advancedModifyAfterFormulasSubDoc": { "enabled": true, "visible": true }, "subDocprint": { "enabled": true, "visible": true }, "subDocemail": { "enabled": false, "visible": false }, "subPrintSaveDocumentOnConfirmation": { "enabled": true, "visible": true }, "saveWithoutValidatingSubDoc": { "enabled": true, "visible": true }, "returnToSavedSubDoc": { "enabled": false, "visible": false } }, "attributes": { "_document_number": { "updatable": true, "hasError": false, "visible": true, "hasConstraintViolation": false }, "_sequence_number": { "updatable": true, "hasError": false, "visible": true, "hasConstraintViolation": false }, "_part_number": { "updatable": false, "hasError": false, "visible": true, "hasConstraintViolation": false }, "_price_quantity": { "updatable": true, "hasError": false, "visible": true, "hasConstraintViolation": false } } } }, "items": [{ "_sequence_number": 6, "_part_number": null, "_document_number": 6, "_price_quantity": 1, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453/lineItem/6" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453" } ], "_state": { "hasError": false, "attributes": { "_document_number": { "domain": { "constraintList": [] } }, "_sequence_number": { "domain": { "constraintList": [] } }, "_part_number": { "domain": { "constraintList": [] } }, "_price_quantity": { "updatable": false, "visible": true, "domain": { "constraintList": [] } } }, "queryState": { "hierarchyDepth": 0, "hierarchyMatchStatus": "P" } } }, { "_sequence_number": 8, "_part_number": "part100", "_document_number": 8, "_price_quantity": 3, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453/lineItem/8" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453" } ], "_state": { "hasError": false, "actions": { "_reconfigure_inbound_action": { "enabled": false, "visible": false }, "_reconfigure_action": { "enabled": false, "visible": false } }, "attributes": { "_document_number": { "domain": { "constraintList": [] } }, "_sequence_number": { "domain": { "constraintList": [] } }, "_part_number": { "domain": { "constraintList": [] } }, "_price_quantity": { "updatable": false, "visible": true, "domain": { "constraintList": [] } } }, "queryState": { "hierarchyDepth": 1, "hierarchyMatchStatus": "M" } } }, { "_sequence_number": 12, "_part_number": null, "_document_number": 13, "_price_quantity": 1, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453/lineItem/13" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453" } ], "_state": { "hasError": false, "attributes": { "_document_number": { "domain": { "constraintList": [] } }, "_sequence_number": { "domain": { "constraintList": [] } }, "_part_number": { "domain": { "constraintList": [] } }, "_price_quantity": { "domain": { "constraintList": [] } } }, "queryState": { "hierarchyDepth": 0, "hierarchyMatchStatus": "P" } } }, { "_sequence_number": 15, "_part_number": "part3", "_document_number": 16, "_price_quantity": 4, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453/lineItem/16" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453" } ], "_state": { "hasError": false, "actions": { "_reconfigure_inbound_action": { "enabled": false, "visible": false }, "_reconfigure_action": { "enabled": false, "visible": false } }, "attributes": { "_document_number": { "domain": { "constraintList": [] } }, "_sequence_number": { "domain": { "constraintList": [] } }, "_part_number": { "domain": { "constraintList": [] } }, "_price_quantity": { "domain": { "constraintList": [] } } }, "queryState": { "hierarchyDepth": 1, "hierarchyMatchStatus": "M" } } }, { "_sequence_number": 2, "_part_number": null, "_document_number": 2, "_price_quantity": 5, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453/lineItem/2" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453" } ], "_state": { "hasError": false, "attributes": { "_document_number": { "domain": { "constraintList": [] } }, "_sequence_number": { "domain": { "constraintList": [] } }, "_part_number": { "domain": { "constraintList": [] } }, "_price_quantity": { "domain": { "constraintList": [] } } }, "queryState": { "hierarchyDepth": 0, "hierarchyMatchStatus": "M" } } }, { "_sequence_number": 3, "_part_number": "part1", "_document_number": 3, "_price_quantity": 1, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453/lineItem/3" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453" } ], "_state": { "hasError": false, "actions": { "_reconfigure_inbound_action": { "enabled": false, "visible": false }, "_reconfigure_action": { "enabled": false, "visible": false } }, "attributes": { "_document_number": { "domain": { "constraintList": [] } }, "_sequence_number": { "domain": { "constraintList": [] } }, "_part_number": { "domain": { "constraintList": [] } }, "_price_quantity": { "domain": { "constraintList": [] } } }, "queryState": { "hierarchyDepth": 1, "hierarchyMatchStatus": "C" } } }, { "_sequence_number": 5, "_part_number": "part3", "_document_number": 5, "_price_quantity": 3, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453/lineItem/5" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453" } ], "_state": { "hasError": false, "actions": { "_reconfigure_inbound_action": { "enabled": false, "visible": false }, "_reconfigure_action": { "enabled": false, "visible": false } }, "attributes": { "_document_number": { "domain": { "constraintList": [] } }, "_sequence_number": { "domain": { "constraintList": [] } }, "_part_number": { "domain": { "constraintList": [] } }, "_price_quantity": { "domain": { "constraintList": [] } } }, "queryState": { "hierarchyDepth": 1, "hierarchyMatchStatus": "M" } } }, { "_sequence_number": 4, "_part_number": "part2", "_document_number": 4, "_price_quantity": 5, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453/lineItem/4" }, { "rel": "parent", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453" } ], "_state": { "hasError": false, "actions": { "_reconfigure_inbound_action": { "enabled": false, "visible": false }, "_reconfigure_action": { "enabled": false, "visible": false } }, "attributes": { "_document_number": { "domain": { "constraintList": [] } }, "_sequence_number": { "domain": { "constraintList": [] } }, "_part_number": { "domain": { "constraintList": [] } }, "_price_quantity": { "domain": { "constraintList": [] } } }, "queryState": { "hierarchyDepth": 1, "hierarchyMatchStatus": "M" } } } ], "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453/lineItem" } ] }, "links": [{ "rel": "self", "href": "https://sitename.oracle.com/rest/v13/commerceDocumentsTransaction/19511453" } ] }, "warnings": {} }
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"]}