Reject

This Capture layer rejects or hides the current frame if certain conditions are met.

A rejected frame is not stored in the database. A hidden frame is stored, but is marked as 'hidden' so it will not be included in downloads.

Parameters

NameDefaultMeaning
ifOptional - if true, the frame is rejected
requiredOptional - a list of strings. The frame must contain all of these attribute names.
actionignoreEither ignore or hide.

Description

This function rejects or hides captures based on conditions.

This is normally used to filter out bad data - for example, unusually short product batches, times when no data was available, or setting reasonable limits on values.

Note that you ignore a frame, all processing will stop (later layers won't be run). If you hide a frame, the later layers will still be processed as normal.

Example

{
   "type": "reject",
   "required": ["Machine.Speed"],
   "action": "ignore"
}

The layer will not record the capture unless it contains the attribute 'Machine.Speed'.

{
   "type": "reject",
   "if": "{Duration} < 120",
   "action": "hide"
}

The layer will hide the capture if it takes less than 2 minutes.