Read Only Grid - Setting Page Number
I have a record-backed read only grid with multiple pages (10 rows per page). In the interface the user selects 1 row in the grid, the grid is hidden and input fields are shown, and when the user hits a button the fields are hidden and the grid is refreshed (to show changes made in fields) and shown to the user again. The problem I am having is the page that the user is on gets reset when the grid is reloaded, so if they selected something on page 10, they would be back on page 1 after the grid refreshes and would need to navigate back to page 10.
Is there anyway to keep and/or save and reapply the current page number to the grid so that the user does not have to find their place again?
I know there is the "pagingSaveInto" parameter that saves the current paging info of the grid, but I don't see a way to apply that to the grid.
I have attached the SAIL code for my gridField component below.
Any advice or direction is greatly appreciated!
a!gridField(
label: "Recommendation Grid",
labelPosition: "COLLAPSED",
data: a!recordData(
recordType: 'recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp',
filters: a!queryLogicalExpression(
operator: "AND",
filters: {
a!queryFilter(
field: 'recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp.fields.{d0c49889-6f08-4eba-bc9f-d04cadb88d17}custId',
operator: "=",
value: ri!custID
),
a!queryFilter(
field: 'recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp.fields.{69bb655b-6792-4d0c-882d-e808d9162b7d}locId',
operator: "=",
value: ri!locID
)
},
ignoreFiltersWithEmptyValues: true
)
),
columns: {
a!gridColumn(
label: "Equipment Id",
sortField: 'recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp.fields.{351098f2-3bd8-40ca-9d8f-2ce3c5162466}equipId',
value: fv!row['recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp.fields.{351098f2-3bd8-40ca-9d8f-2ce3c5162466}equipId']
),
a!gridColumn(
label: "Service Description",
sortField: 'recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp.relationships.{ffc37494-c395-4c92-abf4-ee496a2ea7fb}samsSurveyData.fields.{5898e6c1-9b33-4563-a3f8-5e8b77733da3}serviceDescription',
value: fv!row['recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp.relationships.{ffc37494-c395-4c92-abf4-ee496a2ea7fb}samsSurveyData.fields.{5898e6c1-9b33-4563-a3f8-5e8b77733da3}serviceDescription']
),
a!gridColumn(
label: "Recommended Part Number",
sortField: 'recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp.fields.{25c9c265-5e3b-4b03-8f40-9e09e788b815}adviceid',
value: fv!row['recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp.fields.{25c9c265-5e3b-4b03-8f40-9e09e788b815}adviceid']
),
a!gridColumn(
label: "Recommended Flush Plan",
sortField: 'recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp.fields.{43147ee1-1b62-4046-bf12-31195409a794}recFlushPlan',
value: fv!row['recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp.fields.{43147ee1-1b62-4046-bf12-31195409a794}recFlushPlan']
),
a!gridColumn(
label: "Comments",
sortField: 'recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp.fields.{8aed024e-4792-4f66-9cac-799c04f5838e}recComments',
value: fv!row['recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp.fields.{8aed024e-4792-4f66-9cac-799c04f5838e}recComments']
)
},
initialSorts: a!sortInfo(
field: 'recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp.fields.{351098f2-3bd8-40ca-9d8f-2ce3c5162466}equipId',
ascending: true()
),
selectable: true(),
selectionStyle: "ROW_HIGHLIGHT",
selectionValue: local!selectionValue,
selectionSaveInto: {
local!selectionValue,
a!save(
local!editRow,
fv!selectedRows['recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp.fields.{351098f2-3bd8-40ca-9d8f-2ce3c5162466}equipId'][1]
),
a!save(
ri!recInfo,
a!queryRecordByIdentifier(
recordType: 'recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp',
identifier: local!selectionValue[1]
)
)
},
maxSelections: 1,
validations: {},
borderStyle: "LIGHT",
refreshOnVarChange: local!gridUpdate,
refreshAfter: "RECORD_ACTION",
userFilters: {
'recordType!{100a00b9-8c15-4fca-8f8e-00c7044acb96}SR RecommendationTemp.filters.{3163b259-e8f7-4c1c-87be-c3dd00a7bfbf}recTemp_RecStatusFilter'
},
showSearchBox: true,
showRefreshButton: true,
pageSize: 10,
pagingSaveInto: {
a!save(
local!gridPagingInfo,
fv!pagingInfo
)
}
)