---
title: "setQuantityRelation"
slug: "api/basket/operations/setquantityrelation"
sidebar:
  order: 478
---

<a id="ref-c1f225e9cb55"></a>
<a id="ref-9c02f5faaa96"></a>
<a id="ref-f30a7e1afff5"></a>

## Synopsis

```text
void setQuantityRelation(SessionId sessionId,
    BItemId[]          itemIds,
    string ppName,
    string condType,
    int counter,
    decimal quantity,
    string unit,
    ItemSelectionOptions options)
throws BasketServiceFault;
```

See also: [`SessionId`](/pCon/configuratorOnline/specs/api/session/types/sessionid#ref-02e397c8fdb4), [`BItemId`](/pCon/configuratorOnline/specs/api/basket/types/bitemid#ref-bccb6c926e5b), [`ItemSelectionOptions`](/pCon/configuratorOnline/specs/api/basket/types/itemselectionoptions#ref-96d714d65dbc), [`BasketServiceFault`](/pCon/configuratorOnline/specs/api/basket/faults/basketservicefault#ref-d5adb74faa1b)

Sets the quantity relation for a calculation line (e.g. by piece).

It fails if the new value is either negative or zero or if called for a folder.

The `ppName` argument may be an empty string if only one pricing procedure has been added to the basket. `counter` may be -1 if the calculation contains only one condition of the given type.
