Issue with selectionSaveInto in Readonly selectable Grid

Certified Senior Developer

local!selectedRows not saving recent selection

Hi All,

we are using 19.4 version. This foreach written inside local!variables, In the code based on the local!selectedRows saved, it will
update a dropdownfield inside a!gridLayout() using refresh varaible.

The problem is with local!selectedRows, gridField contains no of rows for each items. The selected rows should save recent selection
of each items. Selection and deselction of rows happening correctly, but local!selectedRows not updating with current selection.
It having oldselected rows value. How to get the recent selected rows updated in local!selectedRows

Please provide your suggestion.

a!foreach(
items: local!examSeries,
expression : a!boxLayout
(
a!gridLayout(),
a!gridField
(
data: fv!item.id
selectionValue : fv!item.selection,
selectionSaveInto :
{
fv!item.selection,
a!save(local!selectedRows, append(local!selectedRows,fv!selectedRows)),
a!save(local!selectedRows, difference(local!selectedRows,fv!deselectedRows))
}
)
)
)

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    The example code you've posted seems as if it would be creating a separate read-only grid for each item in local!examSeries... is that really your intent? If so, I'm not sure I understand the point.

  • 0
    Certified Senior Developer
    in reply to Mike Schmitt

    Yes mike, separate read only grid will be created for each item in  local!examSeries inside single interface. The items maybe 3 or 4, any count can come in local!examseries, we need local!selectedRows to save all selected rows of each items.

    for ex

    Item 1 having 3 rows - here i am selecting one row

    Item 2 having 5 rows - here i am selecting two rows

    So, three rows should be saved in local!selectedRows.

    In the given selectionsaveInto, rows are not saving the current selection, It keeping the old values. local!selectedrows not refreshing with current selection. In item 1 - A, B, C rows are there. first selected B, Then A selected, later deselecting B. local!selectedRows saves B only, not refreshed to save A value. 

Reply
  • 0
    Certified Senior Developer
    in reply to Mike Schmitt

    Yes mike, separate read only grid will be created for each item in  local!examSeries inside single interface. The items maybe 3 or 4, any count can come in local!examseries, we need local!selectedRows to save all selected rows of each items.

    for ex

    Item 1 having 3 rows - here i am selecting one row

    Item 2 having 5 rows - here i am selecting two rows

    So, three rows should be saved in local!selectedRows.

    In the given selectionsaveInto, rows are not saving the current selection, It keeping the old values. local!selectedrows not refreshing with current selection. In item 1 - A, B, C rows are there. first selected B, Then A selected, later deselecting B. local!selectedRows saves B only, not refreshed to save A value. 

Children
No Data