Users are losing filters when they go back to the reports.

Hi, we have recently started rolling out our redesigned processes in tempo moving users from portal and portal reports for accessing their work.

While they are enjoying the new interface one of the key frustrations is how users are losing filters when they go back to the reports.

Has anyone else found this and if so any ideas for getting around it?

Thanks, David

OriginalPostID-184355

OriginalPostID-184355

  Discussion posts and replies are publicly visible

Parents
  • As mentioned above, we are using the Start Process Writer plugin to achieve this functionality, with the plugin installed it is less work than it appears. One DB table holds [report], [empId], [option], [setting]. Each report will call a query rule on load() based on the loggedinuser() and report (text value) to retrieve a set of stored defaults (option & setting) for the report being viewed. Any found defaults are then used in setting load values for all fields, and 2 links on the report are used with Start Process Writer for Set Defaults and Clear Defaults. Set sends current filter values to a process model as inputs, stores off to the DB - Clear simply empties the DB for the current loggedinuser() and report.

    This code also contains a 'COLUMNS' parameter, used for a checkbox list selection to allow users to add/remove columns from the report, which is also saved with default filters.

    =load(
    local!report: "WRS_all",
    local!setDefaultModelId: cons!SET_REPORT_DEFAULT_MODEL_ID,
    local!loggedInId: rule!getEmployeeID(loggedinuser()), /* function grabs from user record */
    local!defaultFilters: rule!BPM_qrGetReportDefaults(local!loggedInId,local!report),
    local!defaultColumns: rule!BPM_getDefaultFilter(local!defaultFilters,"COLUMNS"),
    local!processWrite: bind(get: {}, set: startprocesswrite(processModelId: local!setDefaultModelId, processParameters:_)),
    local!filterStatus: rule!BPM_getDefaultFilter(local!defaultFilters,"status"),
    local!filterStage: rule!BPM_getDefaultFilter(local!defaultFilters,"stage"),
    .
    .
    a!dropdownField(
    label: "Status",
    labelPosition: "ADJACENT",
    placeHolderLabel: "All",
    choiceLabels: {"Active","Completed","Cancelled"},
    choiceValues: {"Active","Completed","Cancelled"},
    value: local!filterStatus,
    saveInto: local!filterStatus
    )
    .
    .
    a!richTextDisplayField(
    value: {
    a!richTextItem(
    text: "Set Defaults",
    link:
    a!dynamicLink(
    value: {
    report: local!report,
    empId: local!loggedInId,
    operator: "set",
    option: {"stage","status"},
    setting: {local!filterStage,local!filterStatus},
    COLUMNS: local!columnSelection
    },
    saveInto: {
    local!processWrite
    }
    )
    ),
    " | ",
    a!richTextItem(
    text: "Clear Defaults",
    link:
    a!dynamicLink(
    value: {
    report: local!report,
    empId: local!loggedInId,
    operator: "clear",
    option: {},
    setting: {}
    },
    saveInto: {
    local!processWrite,
    a!save(local!filterStatus,null),
    a!save(local!filterStage,null)
    }
    )
    )
    }
    )
    .
    .
    )


    rule!BPM_getDefaultFilter(defaultFilters,option): /* defaultFilters = Any Type, option = Text */

    with(
    local!options: apply(fn!tostring,ri!defaultFilters.option),
    local!settings: apply(fn!tostring,ri!defaultFilters.setting),

    if(ri!option="COLUMNS",
    index(local!settings,wherecontains("COLUMNS",local!options),null),
    displayValue(ri!option,local!options,local!settings,null)
    )
    )

Reply
  • As mentioned above, we are using the Start Process Writer plugin to achieve this functionality, with the plugin installed it is less work than it appears. One DB table holds [report], [empId], [option], [setting]. Each report will call a query rule on load() based on the loggedinuser() and report (text value) to retrieve a set of stored defaults (option & setting) for the report being viewed. Any found defaults are then used in setting load values for all fields, and 2 links on the report are used with Start Process Writer for Set Defaults and Clear Defaults. Set sends current filter values to a process model as inputs, stores off to the DB - Clear simply empties the DB for the current loggedinuser() and report.

    This code also contains a 'COLUMNS' parameter, used for a checkbox list selection to allow users to add/remove columns from the report, which is also saved with default filters.

    =load(
    local!report: "WRS_all",
    local!setDefaultModelId: cons!SET_REPORT_DEFAULT_MODEL_ID,
    local!loggedInId: rule!getEmployeeID(loggedinuser()), /* function grabs from user record */
    local!defaultFilters: rule!BPM_qrGetReportDefaults(local!loggedInId,local!report),
    local!defaultColumns: rule!BPM_getDefaultFilter(local!defaultFilters,"COLUMNS"),
    local!processWrite: bind(get: {}, set: startprocesswrite(processModelId: local!setDefaultModelId, processParameters:_)),
    local!filterStatus: rule!BPM_getDefaultFilter(local!defaultFilters,"status"),
    local!filterStage: rule!BPM_getDefaultFilter(local!defaultFilters,"stage"),
    .
    .
    a!dropdownField(
    label: "Status",
    labelPosition: "ADJACENT",
    placeHolderLabel: "All",
    choiceLabels: {"Active","Completed","Cancelled"},
    choiceValues: {"Active","Completed","Cancelled"},
    value: local!filterStatus,
    saveInto: local!filterStatus
    )
    .
    .
    a!richTextDisplayField(
    value: {
    a!richTextItem(
    text: "Set Defaults",
    link:
    a!dynamicLink(
    value: {
    report: local!report,
    empId: local!loggedInId,
    operator: "set",
    option: {"stage","status"},
    setting: {local!filterStage,local!filterStatus},
    COLUMNS: local!columnSelection
    },
    saveInto: {
    local!processWrite
    }
    )
    ),
    " | ",
    a!richTextItem(
    text: "Clear Defaults",
    link:
    a!dynamicLink(
    value: {
    report: local!report,
    empId: local!loggedInId,
    operator: "clear",
    option: {},
    setting: {}
    },
    saveInto: {
    local!processWrite,
    a!save(local!filterStatus,null),
    a!save(local!filterStage,null)
    }
    )
    )
    }
    )
    .
    .
    )


    rule!BPM_getDefaultFilter(defaultFilters,option): /* defaultFilters = Any Type, option = Text */

    with(
    local!options: apply(fn!tostring,ri!defaultFilters.option),
    local!settings: apply(fn!tostring,ri!defaultFilters.setting),

    if(ri!option="COLUMNS",
    index(local!settings,wherecontains("COLUMNS",local!options),null),
    displayValue(ri!option,local!options,local!settings,null)
    )
    )

Children
No Data