1. Url filter

    Article: AN0001764Updated: 03.12.2018

    When displaying data from a class or query in the list of records, it is possible to enable the quick filter to filter the records in a simple way.

    However, it is also possible to enter the filter directly in the URL and filter the records immediatelly. This can be successfully used e.g. by:

    • Clicking on the record in a query, where the query shows summary information, leads to display of all the records underlying the summary number. E.g.: if there is number of all New tasks for particular users in the query, than clicking on this number can lead to the class Task and filtering these particular new tasks.
    • You can refer to particular records from an external application.
    • You can save URL with a filter to often checked records. Supposing users check daily records of particular status, these records can be displayed with a simple filter associated to a button.

    Filter definition

    The filter is composed of particular conditions separated by logical operators AND and OR utilizing also brackets. Filter syntax is following:

    columncode1CONDITIONOPERATOR1data1~LOGICALOPERATORcolumncode2CONDITIONOPERATOR2data2....

    columncode1 - code of column, in which we want to filter. if we want to filter in a column inherited from a parent class, we have to state code of the parent class, in which the column is defined and separate it by a dot - parentclasscode.columncode

    CONDITIONOPERATOR1 - operator of condition for comparing the filtered value (e.g. EQ, CONTAINS etc.)

    data1 - the input value that we want to compare with values in the column. It is necessary to put sign ~ behind the value. If this sign is present in the input value we have to double it (e.g. &filter=shorttext1CONTAINS~~at~).

    Example 1: Filtering records, where value in column name equals value "text" taken over from URL

    Datas.aspx?CId=375&filter=nameEQtest~

     

    Example 2: Filtering records with time in column date1 that equal yesterday

    Datas.aspx?CId=579&filter=date1ININTERVALYesterday~

     

    Example 3: Filtering records meeting at least one of the first three  conditions and the fourth condition at the same time

    Datas.aspx?CId=579&filter=(integer1GT20~ORinteger2EQ20~ORinteger1EQ18~)ANDshorttext1CONTAINStest~

     

    Example 4: Filtering values in column date1, that are greater than current time

    Datas.aspx?CId=579&filter=date1GTnow~

     

    Example 5: Comparing values in column date1 with date time value taken over from URL

    Datas.aspx?CId=579&filter=date1LT28_02_2015 23_59~

     

    Example 6: Comparing values in two class columns

    Datas.aspx?CId=579&filter=person1COLUMNLTCOLUMNEQperson2

     

    Example 7: Comparing values in a inherited column of type referencePorovnání hodnot ve zděděném sloupci typu odkaz na jinou třídu a vlastním sloupci třídy typu odkaz na jinou třídu

    Datas.aspx?CId=536&filter=parent_class.referenceCOLUMNEQself_reference

     Example 8: Filtering records of a certain child class

    Datas.aspx?CId=536&filter=EQmachine

     

    For the condition operator use one of following possibilities

    Name Operator Description
    Eq = The value from URL is equal to the value in the column
    Neq != The value from URL is not equal to the value in the column
    Le <= The value from URL is less than or equal to the value in the column
    Lt < The value from URL is less than the value in the column
    Ge >= The value from URL is greater than or equal to the value in the column
    Gt > The value from URL is greater than the value in the column
    IsNull   The value in URL is null
    IsNotNull   The value in URL is not null
    Contain   The string in the column contains the string from URL
    NotContain   The string in the column does not contain the string from URL
    StartWith   The string in the column starts with the string from URL
    NotStartWith   The string in the column does not start with the string from URL
    EndWith   The string in the column ends with the string from URL
    NotEndWith   The string in the column does not end with the string from URL
    Eg(Column) =(Column) The value from the column 1 from URL is equal to the value in the column 2 from URL
    Neg(Column) !=(Column) The value from the column 1 from URL is not equal to the value in the column 2 from URL
    Gt(Column) >(Column) The value from the column 1 from URL is greater than the value in the column 2 from URL
    Ge(Column) >=(Column) The value from the column 1 from URL is greater than or equal to the value in the column 2 from URL
    Lt(Column) <(Column) The value from the column 1 from URL is  less than the value in the column 2 from URL
    Le(Column) <=(Column) The value from the column 1 from URL is less than or equal to the value in the column 2 from URL
    LENEQ = (length) The string length in column is equal to the value from URL
    LENNEQ != (length) The string length in column is not equal to the value from URL
    LENLT < (length) The string length in column is less than the value from URL
    LENLE <= (length) The string length in column is less than or equal to the value from URL
    LENGT > (length) The string length in column is greater than the value from URL
    LENGE >= (length) The string length in column  is greater than or equal the value from URL

     

    Values for operator ININTERVAL

    Operator value Description
    Yesterday Yesterday (00:00:00 - 23:59:59)
    Today Today (00:00:00 - 23:59:59)
    Tomorrow Tomorrow (00:00:00 - 23:59:59)
    PreviousWeek Previous week
    ThisWeek This week
    NextWeek Next week
    PreviousMonth Previous month
    ThisMonth This month
    NextMonth Next month
    PreviousQuarter Previous quarter
    ThisQuarter This quarter
    NextQuarter Next quarter
    PreviousYear Previous year
    ThisYear This year
    NextYear Next year
    PreviousHour Previous hour (xx:00 - xx:59)
    ThisHour This hour (xx:00 - xx:59)
    NexHour next hour (xx:00 - xx:59)

     

    Values for condition operators =,!=,>,>=,<,<= 

    Operator value Description
    Datetime Folows definition of date and time (format according to the column)
    Now Now
    Before15Minutes Before 15 minutes
    Before30Minutes Before 30 minutes
    Before45Minutes Before 45 minutes

     

×