` Printed Icetips Article

Icetips Article



Par2: Conditional range limit
2001-01-12 -- Dennis Evans
 
> In the browse template under browse box behavior you can limit >a browses
records by identifying the limiting field in a key, the >type of limit to be
performed and the range limit boundaries.

> this works fine BUT what I want to do is make this conditional >based on a
second varibale...
> something like :
> if glo:var = 'xxx'
>     use the limiter described
>  .

   If I follow what you are wanting to accomplish then set up the limits
normally.   In the ApplyRange method, before parent call

  if (Condition = Use Range Limits)
      Self.Order.LimitType = Limit:Single/Current/Pair
  else
      Self.Order.LimitType = Limit:None
  end

When LimitType is Limit:None the range limit conditions are not read into
the prop filter statement.   When LimitType = Single etc...
the conditions are read into the filter.


   Also if you are using different conditions on each tab sort order
be sure to test for the current tab.

   case choice(?currenttab)
      of  1
           limit test
      of 2
           a different limit test
      of 3
         ....
   end



Printed May 5, 2024, 5:13 am
This article has been viewed/printed 35112 times.