Learn R Programming

Rlabkey (version 3.3.0)

labkey.domain.createConditionalFormatQueryFilter: Create a conditional format query filter

Description

Create a conditional format query filter string.

Usage

labkey.domain.createConditionalFormatQueryFilter(filterType, value,
    additionalFilter=NULL, additionalValue=NULL)

Value

The string specifying a query filter in LabKey filter URL format.

Arguments

filterType

a string specifying a permitted relational operator

value

a string specifying a comparand

additionalFilter

a string specifying a second relational operator

additionalValue

a string specifying a second comparand

Author

Rosaline Pyktel

Details

This function can be used to as a convenience wrapper to construct a query filter string for conditional formats. Two relational expressions may be formed, one with the first two parameters (for instance, parameter values '50' and 'eq' for value and filter respectively would create a condition of 'equals 50') and the second with the remaining two optional parameters. If both conditions are created, they are conjunct with a logical AND, and a value would have to pass both conditions to clear the filter. This function can be used in conjunction with labkey.domain.FILTER_TYPES for easy access to the set of permitted relational operators.

See Also

labkey.domain.get, labkey.domain.create, labkey.domain.createDesign, labkey.domain.inferFields, labkey.domain.save, labkey.domain.drop, labkey.domain.createConditionalFormat, labkey.domain.FILTER_TYPES

Examples

Run this code
if (FALSE) {

library(Rlabkey)

qf <- labkey.domain.FILTER_TYPES

# Filters for values equal to 750
qf1 <- labkey.domain.createConditionalFormatQueryFilter(qf$EQUAL, 750)
# Filters for values greater than 500, but less than 1000
qf2 <- labkey.domain.createConditionalFormatQueryFilter(qf$GREATER_THAN, 500, qf$LESS_THAN, 1000)

}

Run the code above in your browser using DataLab