Search Builder < Less Than is showing null/empty data

Search Builder < Less Than is showing null/empty data

turftalent1turftalent1 Posts: 2Questions: 1Answers: 0

When using the searchBuilder I would like the empty values to be excluded when using < less than. They are excluded from greater than. I understand I can add a condition after like: Column not empty, but I feel it would make more sense if they are excluded automatically. It is almost like those empty values are treated like zeros.

Can this be done?

Answers

  • turftalent1turftalent1 Posts: 2Questions: 1Answers: 0
    edited January 2023

    Was able to get it figured out.

                    searchBuilder: {
                        columns: [0, 1, 2, 3, 4, 5, 6, 7],.
                        conditions: {
                            num: {
                                '<': {
                                    search: function (value, comparison) {
                                        return +value < +comparison && +value != +null;
                                    }
                                },
                                '<=': {
                                    search: function (value, comparison) {
                                        return +value <= +comparison && +value != +null;
                                    }
                                }
                            }
                        }
                    },
    
Sign In or Register to comment.