Filter Field where Checkbox = true

☑️ Filter fields where checkbox is enabled.

1. Overview

This Interaction filters fields to only show those entries where the checkbox always equals "true".

2. Examples

Refer to the examples below:

2.1. Example 1

This example merges all quote-template actions where the type is checkbox and the operator field is set to is_true.

async function handler(clev) {
    let actions = [];

    actions.push(
        clev.setFilters("quote-template", [
            {
                subject: "use-as-template",
                requestType: "i",
                type: "checkbox",
                operator: "is_true",
            },
        ])
    );

    return clev.mergeAll(actions);
}

2.2. Example 2

This function returns all those quote-template filters where the checkbox is set to true.

async function handler(C) {
    const filter = C.setFilters("quote-template", [
        {
            subject: "use-as-template",
            requestType: "i",
            type: "checkbox",
            operator: "is_true",
        },
    ]);
    return filter;
}

📌 Need Help?

If you require assistance or encounter any issues, please don't hesitate to contact us for further support.