Skip to main content

addFilter()

Last updated 5/09/2024

Example

The following code adds the OrdersKey to the stack so any forms referencing a datasource 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);
}