Interpreter

How to exclude products with zero price or empty stock

2026-05-27
Task

Exclude the entire record when the source price is zero or negative, or when stock is empty.

Short answer

For an already numeric price, add two Before transformations conditions: price is greater than 0 and stock is not empty. In a table the conditions apply to the row; in JSON put them on price with For the whole element; in XML put them on the repeating record node.

price, stock, rows, and row are example names. Your fields and nodes may have different names: select the actual price field, stock field, and the element that represents one record.

Suitable source data. This recipe expects numeric values such as 10, 10.5, or 10,5. A value such as 12 490 USD contains text and does not fit this cross-format setup.

The recipe deliberately uses Before transformations: one After transformations setup does not currently behave the same in all three tools.

IDpricestockExpected result
FL-01103record remains
FL-0203record is excluded
FL-03-13record is excluded
FL-0410emptyrecord is excluded
FL-050emptyrecord is excluded

How to do it in Eofferix

Table result

  1. Open the gear button for the price column, price in this example.
  2. Under Export conditions, add Current valueBefore transformationsGreater than0.
  3. Add stockBefore transformationsNot empty.
  4. Click Save. No scope choice is needed: the conditions exclude the table row.
Table snapshot: opening the price column settings
The gear button in the price header opens conditions for the whole row.
Row export conditions based on price and stock in a table
The row remains only when price is greater than 0 and stock is not empty; both checks run before transformations.

JSON result

  1. Open the price value inside one object of the rows array.
  2. Under Export conditions, select For the whole element.
  3. Add Current valueBefore transformationsGreater than0.
  4. Add /rows/stockBefore transformationsNot empty, then click Save.
JSON snapshot: opening the price value inside a rows record
For JSON, open the price value inside an object of the rows array.
JSON object export conditions based on price and stock
For the whole element excludes the entire rows object when either condition fails.

XML result

  1. Open the repeating node for one record, /workbook/sheet/row in this example. Do not open its price child.
  2. Select For the whole element.
  3. Add /workbook/sheet/row/priceBefore transformationsGreater than0.
  4. Add /workbook/sheet/row/stockBefore transformationsNot empty, then click Save.
Export conditions on the repeating XML row node based on price and stock
The conditions are attached to the repeating row, so the entire record is excluded rather than only the price child.

Result

Only FL-01 remains in the final table, JSON, or XML. In this JSON scenario, the general preview may still show all five source objects, so verify the filter in the downloaded output of a test export.

The JSON values below are strings because the test source was CSV. If the source stores numbers as numbers, the output type may remain numeric.

JSON

result
{
  "rows": [
    {
      "id": "FL-01",
      "price": "10",
      "stock": "3"
    }
  ]
}

XML

result fragment
<row>
  <id>FL-01</id>
  <price>10</price>
  <stock>3</stock>
</row>

Important details

  • Not empty allows stock=0. If stock must be a positive number, use Greater than with 0.
  • Do not export field inside Transformations clears only one value and does not remove the record. This recipe uses Export conditions.
  • The setting location follows the result: a table column excludes its row, a JSON value with whole-element scope excludes the array object, and the repeating XML node excludes its record.

See Export conditions, Rule conditions, table, JSON, and XML.

Process data faster with Eofferix

Create a free account to automate catalogs and price lists around your own rules.

Sign up