Skip to main content

Generic Filter Component

The Generic Filter decides which rows of the incoming data are processed by the rest of the workflow. It is mainly used to filter the rows of an Excel sheet before they are sent to M3: for example, if a column Import says Yes on 5 of 47 rows, only those 5 rows are processed. Each condition checks one field of a row, such as a column, against a value. It is a VXL Live component: you build it in the Vince Platform workflow editor, and the workflow is used from VXL Live.

The M3 Filter works the other way round: it filters what M3 returns, before it is written back to the sheet.

Not a VXL Live workflow?

The Generic Filter is meant for VXL Live workflows. In other workflows, filter the data with a JSONata expression in a Transform step instead; see the JSONata Masterclass.

M3 Filter or Generic Filter?​

M3 FilterGeneric Filter
Typical useFilter what M3 returns before it is written back to the sheet, when the M3 transaction can't select precisely enoughFilter the spreadsheet rows coming in before they are sent to M3, for example only the rows marked for import
FiltersThe output of an M3 API or M3 Fetch stepIncoming rows, such as the rows of the Excel sheet
Where it goesDirectly after the M3 API or M3 Fetch stepBefore the M3 API step
Choosing the fieldPicked from the M3 transaction's fields in the Available fields panelTyped by name, for example a column name
Data typeTaken from the M3 fieldChosen per condition: String, Number or Boolean
Excel-input workflowsCan apply to all transactions (Global filter) or to one transactionApplies to the rows it receives
Value fromClient (on the run form) or ConstantClient (on the run form) or Constant
Combine conditionsAnd / OrAnd / Or

Example: only the rows marked for import​

A sheet has 47 rows of item updates and a column called Import. The user has put Yes in that column on the 5 rows that should be sent to M3.

  1. Add the Generic Filter before the M3 API step.
  2. Select Add filter item.
  3. In Field, type Import.
  4. Set Comparison to Equal, Source to Constant, Data type to String and Value to Yes.
  5. Select Save.

When the workflow runs from VXL Live, only the 5 marked rows are sent to M3; the other 42 are skipped. If some users mark rows with 1 instead, add a second item with the value 1 and set Logical operator to Or.


Add a condition​

  1. Select Add filter item. Each item is one condition.
  2. In Field, type the name of the field to check, for example the column name used in the spreadsheet.
  3. Choose a Comparison, such as Equal or Greater than.
  4. Choose a Source and a Data type (String, Number or Boolean).
  5. Enter the Value to compare against.
  6. To add more conditions, select Add filter item again and set Logical operator to And or Or on each item to say how it combines with the others.
  7. Select Save.

Every condition needs a Field. A condition with the source Constant also needs a Value. Use the trash icon to remove a condition.


Comparisons​

ComparisonKeeps the row when the field
Equal / Not equalis, or is not, the value
Less than / Less than inclusiveis below the value, or below or equal to it
Greater than / Greater than inclusiveis above the value, or above or equal to it
Contains / Does not containincludes, or does not include, the text. Not available for Number.
Is blank / Is not blankis empty, or is not empty

With Is blank and Is not blank there is no value to enter, and the source is set to Constant automatically.


Source​

The source decides where the value comes from.

SourceBehaviour
ClientThe person running the workflow enters the value on the execution form. The value you type in the editor is the default.
ConstantThe value you enter is always used. It does not appear on the execution form.
caution

A workflow that runs without anyone present, such as a scheduled workflow, has nobody to fill in a value on the execution form. Use Constant for these workflows.


  • M3 Filter — filter M3 API output
  • Excel — map the spreadsheet that the filter works on
  • File Loader — load the file whose rows are filtered