Is there anything similar to a!pagingInfo (used for pagination in a!gridField)

Is there anything similar to a!pagingInfo (used for pagination in a!gridField) which can be applied for applying pagination for an editable grid(constructed by a!gridLayout)....

OriginalPostID-128158

OriginalPostID-128158

  Discussion posts and replies are publicly visible

Parents
  • HI , i am having issue in sorting the grid data,can you please let me know where is my below code wrong.

    load(
    local!showMine: true,
    local!showFuture: true,
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 10,
    sort: a!sortInfo(
    field: "taskId_int",
    ascending: false
    )
    ),
    local!user: loggedinuser(),
    local!loggedInUsersGroups: getgroupsformemberuser(
    local!user
    ),
    local!filterStartDate,
    local!filterEndDate,
    local!filterPreparerGroup,
    local!filterProject: index(
    rule!CCAR_QE_getKeyValuePairForHandoffFilters(
    pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: -1,
    sort: a!sortInfo(
    field: "projectId_int",
    ascending: false
    )
    ),
    user: loggedInUser(),
    showMine: local!showMine,
    showFuture: local!showFuture,
    returnDatasubset: false,
    keyGroupingField: "projectId_int",
    valueGroupingField: "projectName_txt"
    ),
    "projectId_int",
    null
    ),
    local!filterPhase,
    with(
    local!phaseOptions_cdt: if(
    isnull(
    local!filterProject
    ),
    null,
    rule!CCAR_QE_getPhaseByProjectId(
    pagingInfo: null,
    projectId_int: local!filterProject
    )
    ),
    local!resetPagingInfo: a!save(
    local!pagingInfo,
    a!pagingInfo(
    startIndex: 1,
    batchSize: 10,
    sort: a!sortInfo(
    field: "taskId_int",
    ascending: true
    )
    )
    ),
    local!resetFilters: a!save(
    {
    local!filterStartDate,
    local!filterEndDate,
    local!filterPreparerGroup,
    local!filterProject,
    local!filterPhase
    },
    null
    ),
    local!gridDatasubset: rule!CCAR_QE_getAcceptanceReportData(
    pagingInfo: local!pagingInfo,
    user: loggedInUser(),
    showMine: local!showMine,
    showFuture: local!showFuture,
    filterProject: local!filterProject,
    filterPhase: local!filterphase,
    filterStartDate: local!filterStartDate,
    filterEndDate: local!filterEndDate,
    filterPreparerGroup: local!filterPreparerGroup,
    removeStatusId: {
    cons!CCAR_VAL_STATUS_RESTARTED
    }
    ),
    /* project dropdown options */
    local!projectKeyValueDatasubset: rule!CCAR_QE_getKeyValuePairForHandoffFilters(
    pagingInfo: null,
    user: local!user,
    showMine: local!showMine,
    showFuture: local!showFuture,
    returnDatasubset: true,
    keyGroupingField: "projectId_int",
    valueGroupingField: "projectName_txt",
    /*filterStartDate: local!filterStartDate,*/
    /*filterEndDate: local!filterEndDate,*/
    /*filterPreparerGroup: local!filterPreparerGroup,*/
    usersGroups: local!loggedInUsersGroups
    ),
    local!allSyncUniqueProjectNames: index(
    local!projectKeyValueDatasubset.data,
    "projectName_txt",
    {}
    ),
    local!allSyncUniqueProjectId: index(
    local!projectKeyValueDatasubset.data,
    "projectId_int",
    {}
    ),
    /* phase dropdown options */
    /*local!phaseKeyValueDatasubset: rule!CCAR_QE_getKeyValuePairForHandoffFilters(*/
    /*pagingInfo: null,*/
    /*user: local!user,*/
    /*showMine: local!showMine,*/
    /*showFuture: local!showFuture,*/
    /*returnDatasubset: true,*/
    /*keyGroupingField: "phaseId_int",*/
    /*valueGroupingField: "phaseName_txt",*/
    /*usersGroups: local!loggedInUsersGroups*/
    /*),*/
    /*local!allSyncUniquePhaseNames: index(*/
    /*local!phaseKeyValueDatasubset.data,*/
    /*"phaseName_txt",*/
    /*{}*/
    /*),*/
    /*local!allSyncUniquePhaseId: index(*/
    /*local!phaseKeyValueDatasubset.data,*/
    /*"phaseId_int",*/
    /*{}*/
    /*),*/
    /* Preparer Workstream dropdown options */
    local!preparerWorkstreamKeyValueDatasubset: rule!CCAR_QE_getKeyValuePairForHandoffFilters(
    pagingInfo: null,
    user: local!user,
    showMine: local!showMine,
    showFuture: local!showFuture,
    returnDatasubset: true,
    keyGroupingField: "taskOwnerGroup_int",
    valueGroupingField: "",
    /*filterStartDate: local!filterStartDate,*/
    /*filterEndDate: local!filterEndDate,*/
    usersGroups: local!loggedInUsersGroups
    ),
    local!allSyncUniquepreparerWorkstreamIds: index(
    local!preparerWorkstreamKeyValueDatasubset.data,
    "taskOwnerGroup_int",
    {}
    ),
    local!allSyncUniquepreparerWorkstreamIdNames: if(
    rule!APN_isBlank(
    local!allSyncUniquepreparerWorkstreamIds
    ),
    {},
    apply(
    rule!CCAR_UT_stripGroupPrefix(
    groupId_int: _
    ),
    local!allSyncUniquepreparerWorkstreamIds
    )
    ),
    a!dashboardLayoutColumns(
    columns: {
    a!columnLayout(
    contents: {
    a!buttonLayout(
    secondaryButtons: {
    a!buttonWidget(
    label: "Future",
    style: if(
    local!showFuture,
    "PRIMARY",
    "NORMAL"
    ),
    value: true,
    saveInto: {
    local!showFuture,
    local!resetPagingInfo,
    local!resetFilters
    }
    ),
    a!buttonWidget(
    label: "Received",
    style: if(
    local!showFuture,
    "NORMAL",
    "PRIMARY"
    ),
    value: false,
    saveInto: {
    local!showFuture,
    local!resetPagingInfo,
    local!resetFilters
    }
    )
    },
    primaryButtons: {
    a!buttonWidget(
    label: "My Handoffs",
    style: if(
    local!showMine,
    "PRIMARY",
    "NORMAL"
    ),
    value: true,
    saveInto: {
    local!showMine,
    local!resetPagingInfo,
    local!resetFilters
    }
    ),
    a!buttonWidget(
    label: "My Group Handoffs",
    style: if(
    local!showMine,
    "NORMAL",
    "PRIMARY"
    ),
    value: false,
    saveInto: {
    local!showMine,
    local!resetPagingInfo,
    local!resetFilters
    }
    )
    }
    ),
    a!sectionLayout_17r1(
    label: "Filters",
    isInitiallyCollapsed: false,
    isCollapsible: true,
    firstColumnContents: {
    rule!HSBC_dropdownField(
    label: "Project",
    choiceLabels: local!allSyncUniqueProjectNames,
    choiceValues: local!allSyncUniqueProjectId,
    placeholderLabel: "All",
    value: local!filterProject,
    saveInto: {
    local!filterProject,
    a!save(
    local!filterPhase,
    null
    ),
    local!resetPagingInfo,

    }
    ),
    rule!HSBC_dropdownField(
    label: "Phase",
    choiceLabels: index(
    local!phaseOptions_cdt,
    "shortName_txt",
    {}
    ),
    choiceValues: index(
    local!phaseOptions_cdt,
    "id_int",
    {}
    ),
    placeholderLabel: "All",
    value: local!filterPhase,
    saveInto: {
    local!filterPhase,
    local!resetPagingInfo,

    }
    ),
    if(
    local!showFuture,

    rule!CCAR_CP_fromToDateGrid(
    fromDate: local!filterStartDate,
    toDate: local!filterEndDate,
    fromAdditionalSaveInto:local!resetPagingInfo,
    toAdditionalSaveInto: local!resetPagingInfo
    ),
    rule!CCAR_CP_fromToDateGrid(
    dateLabel: "Actions Taken ",
    fromDate: local!filterStartDate,
    toDate: local!filterEndDate,
    readOnly: false,
    fromAdditionalSaveInto: local!resetPagingInfo,
    toAdditionalSaveInto: local!resetPagingInfo
    )
    )
    },
    secondColumnContents: {
    rule!HSBC_dropdownField(
    label: "Preparer Workstream",
    choiceLabels: local!allSyncUniquepreparerWorkstreamIdNames,
    choiceValues: local!allSyncUniquepreparerWorkstreamIds,
    placeholderLabel: "All",
    value: local!filterPreparerGroup,
    saveInto: {
    local!filterPreparerGroup,
    local!resetPagingInfo
    }
    ),
    a!linkField(
    align: "RIGHT",
    labelPosition: "COLLAPSED",
    links: a!dynamicLink(
    label: "Reset filters",
    saveInto: {
    local!resetFilters,
    local!resetPagingInfo
    }
    )
    )
    }
    ),
    rule!CCAR_GRID_acceptanceReport(
    pagingInfo: local!pagingInfo,
    datasubset: local!gridDatasubset,
    loggedInUsersGroups: local!loggedInUsersGroups,
    showFuture: local!showFuture,
    showMine: local!showMine
    )
    }
    )
    }
    )
    )
    )
Reply
  • HI , i am having issue in sorting the grid data,can you please let me know where is my below code wrong.

    load(
    local!showMine: true,
    local!showFuture: true,
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 10,
    sort: a!sortInfo(
    field: "taskId_int",
    ascending: false
    )
    ),
    local!user: loggedinuser(),
    local!loggedInUsersGroups: getgroupsformemberuser(
    local!user
    ),
    local!filterStartDate,
    local!filterEndDate,
    local!filterPreparerGroup,
    local!filterProject: index(
    rule!CCAR_QE_getKeyValuePairForHandoffFilters(
    pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: -1,
    sort: a!sortInfo(
    field: "projectId_int",
    ascending: false
    )
    ),
    user: loggedInUser(),
    showMine: local!showMine,
    showFuture: local!showFuture,
    returnDatasubset: false,
    keyGroupingField: "projectId_int",
    valueGroupingField: "projectName_txt"
    ),
    "projectId_int",
    null
    ),
    local!filterPhase,
    with(
    local!phaseOptions_cdt: if(
    isnull(
    local!filterProject
    ),
    null,
    rule!CCAR_QE_getPhaseByProjectId(
    pagingInfo: null,
    projectId_int: local!filterProject
    )
    ),
    local!resetPagingInfo: a!save(
    local!pagingInfo,
    a!pagingInfo(
    startIndex: 1,
    batchSize: 10,
    sort: a!sortInfo(
    field: "taskId_int",
    ascending: true
    )
    )
    ),
    local!resetFilters: a!save(
    {
    local!filterStartDate,
    local!filterEndDate,
    local!filterPreparerGroup,
    local!filterProject,
    local!filterPhase
    },
    null
    ),
    local!gridDatasubset: rule!CCAR_QE_getAcceptanceReportData(
    pagingInfo: local!pagingInfo,
    user: loggedInUser(),
    showMine: local!showMine,
    showFuture: local!showFuture,
    filterProject: local!filterProject,
    filterPhase: local!filterphase,
    filterStartDate: local!filterStartDate,
    filterEndDate: local!filterEndDate,
    filterPreparerGroup: local!filterPreparerGroup,
    removeStatusId: {
    cons!CCAR_VAL_STATUS_RESTARTED
    }
    ),
    /* project dropdown options */
    local!projectKeyValueDatasubset: rule!CCAR_QE_getKeyValuePairForHandoffFilters(
    pagingInfo: null,
    user: local!user,
    showMine: local!showMine,
    showFuture: local!showFuture,
    returnDatasubset: true,
    keyGroupingField: "projectId_int",
    valueGroupingField: "projectName_txt",
    /*filterStartDate: local!filterStartDate,*/
    /*filterEndDate: local!filterEndDate,*/
    /*filterPreparerGroup: local!filterPreparerGroup,*/
    usersGroups: local!loggedInUsersGroups
    ),
    local!allSyncUniqueProjectNames: index(
    local!projectKeyValueDatasubset.data,
    "projectName_txt",
    {}
    ),
    local!allSyncUniqueProjectId: index(
    local!projectKeyValueDatasubset.data,
    "projectId_int",
    {}
    ),
    /* phase dropdown options */
    /*local!phaseKeyValueDatasubset: rule!CCAR_QE_getKeyValuePairForHandoffFilters(*/
    /*pagingInfo: null,*/
    /*user: local!user,*/
    /*showMine: local!showMine,*/
    /*showFuture: local!showFuture,*/
    /*returnDatasubset: true,*/
    /*keyGroupingField: "phaseId_int",*/
    /*valueGroupingField: "phaseName_txt",*/
    /*usersGroups: local!loggedInUsersGroups*/
    /*),*/
    /*local!allSyncUniquePhaseNames: index(*/
    /*local!phaseKeyValueDatasubset.data,*/
    /*"phaseName_txt",*/
    /*{}*/
    /*),*/
    /*local!allSyncUniquePhaseId: index(*/
    /*local!phaseKeyValueDatasubset.data,*/
    /*"phaseId_int",*/
    /*{}*/
    /*),*/
    /* Preparer Workstream dropdown options */
    local!preparerWorkstreamKeyValueDatasubset: rule!CCAR_QE_getKeyValuePairForHandoffFilters(
    pagingInfo: null,
    user: local!user,
    showMine: local!showMine,
    showFuture: local!showFuture,
    returnDatasubset: true,
    keyGroupingField: "taskOwnerGroup_int",
    valueGroupingField: "",
    /*filterStartDate: local!filterStartDate,*/
    /*filterEndDate: local!filterEndDate,*/
    usersGroups: local!loggedInUsersGroups
    ),
    local!allSyncUniquepreparerWorkstreamIds: index(
    local!preparerWorkstreamKeyValueDatasubset.data,
    "taskOwnerGroup_int",
    {}
    ),
    local!allSyncUniquepreparerWorkstreamIdNames: if(
    rule!APN_isBlank(
    local!allSyncUniquepreparerWorkstreamIds
    ),
    {},
    apply(
    rule!CCAR_UT_stripGroupPrefix(
    groupId_int: _
    ),
    local!allSyncUniquepreparerWorkstreamIds
    )
    ),
    a!dashboardLayoutColumns(
    columns: {
    a!columnLayout(
    contents: {
    a!buttonLayout(
    secondaryButtons: {
    a!buttonWidget(
    label: "Future",
    style: if(
    local!showFuture,
    "PRIMARY",
    "NORMAL"
    ),
    value: true,
    saveInto: {
    local!showFuture,
    local!resetPagingInfo,
    local!resetFilters
    }
    ),
    a!buttonWidget(
    label: "Received",
    style: if(
    local!showFuture,
    "NORMAL",
    "PRIMARY"
    ),
    value: false,
    saveInto: {
    local!showFuture,
    local!resetPagingInfo,
    local!resetFilters
    }
    )
    },
    primaryButtons: {
    a!buttonWidget(
    label: "My Handoffs",
    style: if(
    local!showMine,
    "PRIMARY",
    "NORMAL"
    ),
    value: true,
    saveInto: {
    local!showMine,
    local!resetPagingInfo,
    local!resetFilters
    }
    ),
    a!buttonWidget(
    label: "My Group Handoffs",
    style: if(
    local!showMine,
    "NORMAL",
    "PRIMARY"
    ),
    value: false,
    saveInto: {
    local!showMine,
    local!resetPagingInfo,
    local!resetFilters
    }
    )
    }
    ),
    a!sectionLayout_17r1(
    label: "Filters",
    isInitiallyCollapsed: false,
    isCollapsible: true,
    firstColumnContents: {
    rule!HSBC_dropdownField(
    label: "Project",
    choiceLabels: local!allSyncUniqueProjectNames,
    choiceValues: local!allSyncUniqueProjectId,
    placeholderLabel: "All",
    value: local!filterProject,
    saveInto: {
    local!filterProject,
    a!save(
    local!filterPhase,
    null
    ),
    local!resetPagingInfo,

    }
    ),
    rule!HSBC_dropdownField(
    label: "Phase",
    choiceLabels: index(
    local!phaseOptions_cdt,
    "shortName_txt",
    {}
    ),
    choiceValues: index(
    local!phaseOptions_cdt,
    "id_int",
    {}
    ),
    placeholderLabel: "All",
    value: local!filterPhase,
    saveInto: {
    local!filterPhase,
    local!resetPagingInfo,

    }
    ),
    if(
    local!showFuture,

    rule!CCAR_CP_fromToDateGrid(
    fromDate: local!filterStartDate,
    toDate: local!filterEndDate,
    fromAdditionalSaveInto:local!resetPagingInfo,
    toAdditionalSaveInto: local!resetPagingInfo
    ),
    rule!CCAR_CP_fromToDateGrid(
    dateLabel: "Actions Taken ",
    fromDate: local!filterStartDate,
    toDate: local!filterEndDate,
    readOnly: false,
    fromAdditionalSaveInto: local!resetPagingInfo,
    toAdditionalSaveInto: local!resetPagingInfo
    )
    )
    },
    secondColumnContents: {
    rule!HSBC_dropdownField(
    label: "Preparer Workstream",
    choiceLabels: local!allSyncUniquepreparerWorkstreamIdNames,
    choiceValues: local!allSyncUniquepreparerWorkstreamIds,
    placeholderLabel: "All",
    value: local!filterPreparerGroup,
    saveInto: {
    local!filterPreparerGroup,
    local!resetPagingInfo
    }
    ),
    a!linkField(
    align: "RIGHT",
    labelPosition: "COLLAPSED",
    links: a!dynamicLink(
    label: "Reset filters",
    saveInto: {
    local!resetFilters,
    local!resetPagingInfo
    }
    )
    )
    }
    ),
    rule!CCAR_GRID_acceptanceReport(
    pagingInfo: local!pagingInfo,
    datasubset: local!gridDatasubset,
    loggedInUsersGroups: local!loggedInUsersGroups,
    showFuture: local!showFuture,
    showMine: local!showMine
    )
    }
    )
    }
    )
    )
    )
Children
No Data