DATAFILTER Property


10.8, PLBCMP GUI Only

 

The DATAFILTER property allows a filter string to be set for a DATASET object. If the filter string, it is used when DATASET items are being accessed in the GetItem and FindItem methods. By default, this property is not set. The DATASET filtering is only used for data items that contain valid JSON data.The property uses the following format:

 

DATAFILTER={filter}

Note the following:

  1. DATAFILTER may be used in CREATE, SETPROP, or GETPROP statements of a DATASET object.

  2. {filter} can be a Character String Variable or literal that contains a valid filter expression. The filter expression syntax is the same as for the FILTER instruction except valid JSON key names must be used.

 

DATAFILTER Examples:

 

If the DATASET item value is the follwong JSON:

 

    {"Orderid":49,"Prodid":44,"City":"Houston","Quantity":40}

 

The {filter} could be:

 

    City='Denver'

 

    Company LIKE '%Markets%'

 

    Orderid=111

 

    Orderid=111 or Orderid=49

 

    ( Orderid=111 or Orderid=49 ) and Quantity < 15

 

     Prodid >= 40 and Prodid <= 50

 

 

 

See Also: Object Properties, Object IO Instructions, Object Definitions

 



PL/B Language Reference