Need to filter the data of a grid in a tempo report by two filters

Hello,
I need to filter the data of a grid in a tempo report by two filters:
.one filters the data by number
.one filters the data by the value of a dropdwon that i select in the same report
I've read all the guide realtive to filter the data of a grid but i don't find anything, I've tried usin an if condition in the filter and to use the logical expression.
My objective is to obtain the same report as the one shown in this image...

OriginalPostID-134902

OriginalPostID-134902

  Discussion posts and replies are publicly visible

Parents
  • Ok i think we are near the solution (i hope), this is my sail code for the query record
    local!datasubset: queryrecord(
    cons!ApacRequestMobileReport,
    a!query(
    selection: a!querySelection(columns: {
    a!queryColumn(field: "ApacRequestMobile.ID", alias: "ID"),
    a!queryColumn(field: "ApacRequestMobile.Name", alias: "Requestor"),
    a!queryColumn(field: "ApacRequestMobile.LeaveCode", alias: "LeaveType"),
    a!queryColumn(field: "ApacRequestMobile.ApplyDate", alias: "ApplyDate"),
    a!queryColumn(field: "ApacRequestMobile.FromDate", alias: "FromDate"),
    a!queryColumn(field: "ApacRequestMobile.FromTime", alias: "FromTime"),
    a!queryColumn(field: "ApacRequestMobile.ToDate", alias: "ToDate"),
    a!queryColumn(field: "ApacRequestMobile.Totime", alias: "ToTime"),
    a!queryColumn(field: "ApacRequestMobile.Reason", alias: "Reason"),
    a!queryColumn(field: "ApacRequestMobile.Status", alias: "Status"),
    a!queryColumn(field: "ApacRequestMobile.ApprovedDate", alias: "ApprovalDate"),
    a!queryColumn(field: "ApacRequestMobile.ApprovedBy", alias: "ApprovedBy"),
    a!queryColumn(field: "ligtRequest", alias: "lightRequest"),
    a!queryColumn(field: "lightManager", alias: "lightManager")
    }),
    logicalExpression: if(isnull(local!filterLeave),
    a!queryLogicalExpression(
    operator: "AND",
    filters:{
    a!queryFilter(
    field: "ApacRequestMobile.ID",
    operator: "=",
    value: 29
    )
    }
    ),
    a!queryLogicalExpression(
    operator: "AND",
    filters: {
    a!queryFilter(
    field: "ApacRequestMobile.ID",
    operator: "=",
    value: 29
    ),
    a!queryFilter:(
    field: "ApacRequestMobile.LeaveCode",
    operator: "includes",
    value: local!filterLeave
    )
    }
    )
    ),
    pagingInfo: local!pagingInfo
    )
    )

    sail says: Expression evaluation Error "Sintax error. details: expression evaluation error at function a!queryLogicalExpression parameters 2: missing right parenthesis in the expression found: COMMA.

    can anyone help me?
Reply
  • Ok i think we are near the solution (i hope), this is my sail code for the query record
    local!datasubset: queryrecord(
    cons!ApacRequestMobileReport,
    a!query(
    selection: a!querySelection(columns: {
    a!queryColumn(field: "ApacRequestMobile.ID", alias: "ID"),
    a!queryColumn(field: "ApacRequestMobile.Name", alias: "Requestor"),
    a!queryColumn(field: "ApacRequestMobile.LeaveCode", alias: "LeaveType"),
    a!queryColumn(field: "ApacRequestMobile.ApplyDate", alias: "ApplyDate"),
    a!queryColumn(field: "ApacRequestMobile.FromDate", alias: "FromDate"),
    a!queryColumn(field: "ApacRequestMobile.FromTime", alias: "FromTime"),
    a!queryColumn(field: "ApacRequestMobile.ToDate", alias: "ToDate"),
    a!queryColumn(field: "ApacRequestMobile.Totime", alias: "ToTime"),
    a!queryColumn(field: "ApacRequestMobile.Reason", alias: "Reason"),
    a!queryColumn(field: "ApacRequestMobile.Status", alias: "Status"),
    a!queryColumn(field: "ApacRequestMobile.ApprovedDate", alias: "ApprovalDate"),
    a!queryColumn(field: "ApacRequestMobile.ApprovedBy", alias: "ApprovedBy"),
    a!queryColumn(field: "ligtRequest", alias: "lightRequest"),
    a!queryColumn(field: "lightManager", alias: "lightManager")
    }),
    logicalExpression: if(isnull(local!filterLeave),
    a!queryLogicalExpression(
    operator: "AND",
    filters:{
    a!queryFilter(
    field: "ApacRequestMobile.ID",
    operator: "=",
    value: 29
    )
    }
    ),
    a!queryLogicalExpression(
    operator: "AND",
    filters: {
    a!queryFilter(
    field: "ApacRequestMobile.ID",
    operator: "=",
    value: 29
    ),
    a!queryFilter:(
    field: "ApacRequestMobile.LeaveCode",
    operator: "includes",
    value: local!filterLeave
    )
    }
    )
    ),
    pagingInfo: local!pagingInfo
    )
    )

    sail says: Expression evaluation Error "Sintax error. details: expression evaluation error at function a!queryLogicalExpression parameters 2: missing right parenthesis in the expression found: COMMA.

    can anyone help me?
Children
No Data