Skip to main content

addFilter()

Last updated 3/07/2025

Example

The following code adds the OrdersKey to the stack so any forms referencing a data source that have a foreign key to the OrdersKey can be filtered by the selected order.

Filter items that belong to an order
function FilterViewByOrder(five: Five, context: any, result: FiveError) : FiveError {
five.addFilter('Orders.OrdersKey', five.field.Order);
return five.success(result);
}