Try OpenEdge Now
skip to main content
BP Server Developer's Guide
Query service : Working with filters : Constructing Filters
 

Constructing Filters

Keep in mind the following guidelines while constructing a filter.
*When any of the columns are mentioned in the filter, the table alias must be prefixed with them.
*When the dataslot names are mentioned in the columns, they must be in uppercase and must also be enclosed in double quotes since the dataslot name can contain space.
*When any of the time related columns like STARTTIME, ENDTIME, and DUEDATE are used in the Filter, QSClientUtil.getFilterTime(long time in msec) needs to be invoked.
For example, if any of the work item due date is past due, then the condition has to be:
long currentTime = System.currentTimeMillis();
long duedate_value = QSClientUtil.getFilterTime(currentTime);
String condition = "BLWI.DUEDATE <= " + duedate_value;
QSWorkItemFilter wifil = new QSWorkItemFilter("wi_currentdue",null);
wifil.setCondition(condition);
*The priority is stored as NUMBER in the database.
For example, if the priority value is high, then the value stored in the database may be 30. So it is recommended to use QSClientUtil.getIntegerPriority (String str_priority) whenever the PRIORITY is used in the condition.
*Any additional column set in the Filter must have the dataslot table alias prefixed with the dataslot name.
*LIST dataslots are stored as BLOB in the BP Server dataslot table along with other object dataslots under the column called LARGE_DATASLOTS. When the LIST dataslots are to be retrieved using QueryService, the additional column must have an Alias with the LIST Dataslot name in uppercase. For example, if an application has a LIST dataslot by name lstDS of instance scope, then to add the LIST dataslot in the additional column, the column name should be BLIDS.LARGE_DATASLOT AS LSTDS.
*LIST and OBJECT dataslots cannot be used in the Condition and Order by properties of the Filter.