Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    AdvancedCriteria between operator not inclusive

    I'm using cacheAllData="true" on a data source and using a FilterBuilder to create criteria and execute a fetch. When using the "between" operator on an Integer field the results do not include the start and end values.

    For example, I have records with a field SSTR values numbered 1 through 10. If I create criteria with the FilterBuilder and specify field SSTR between 1 and 10 the results include only rows where SSTR>1 and SSTR<10, so records 2-9 appear. If I extend the criteria to "between 0 and 11" rows 1-10 show up.

    #2
    That's as doc'd. There's a betweenInclusive operator if you want endpoints included.

    Comment


      #3
      Sorry. I didn't check the doc. The problem then seems to be that the operator dropdown in the FilterBuilder doesn't include the "between inclusive" operator. Is there a reason why that one operator would not show up?

      Comment


        #4
        Just checked the showcase sample and I don't see "between inclusive" there either.

        Comment


          #5
          Hmm, at the moment, there is an intentional choice to omit the betweenInclusive operator in the FilterBuilder (via operator.hidden) so that there is not such a blizzard of options. Several other operators, such as case sensitive contains/startsWith/etc, are omitted for the same reason.

          What would you ideally like to see here? Both "between" and "between (inclusive)" in the list? Or just one "between" option, but have it be inclusive?

          Comment


            #6
            One "between" option which is inclusive seems the most intuitive.

            Comment


              #7
              On reflection, we agree - we've switched which operator appears by default and this change will be in nightly builds going forward. Let us know if you need a way to do this in a prior build.

              Comment


                #8
                Thanks. We'll be taking a new build soon.

                Comment

                Working...
                X