Pre select the selectable inline grid

Hi All,

I have an selectable inline editable grid in screen 1 where I select few values and also I have another screen 2 which has the same grid but I wanted the grid in the screen 2 will be Pre selected with all the values that are selected in screen 1 inline editable grid..

How to do that.Are there any SAIL examples available.Appreciate all the help.

Cheers
RajHasti

OriginalPostID-254056

  Discussion posts and replies are publicly visible

  • Trying to gather more information here, but is there possibly any unique identifiers that match between your grids in screen 1 and screen 2 that you could use?

    I was thinking you could just pass over IDs of what you selected from screen 1 to screen 2 & have logic in your gridSelection (possibly) to auto-select these.
  • save the gridSelection.selected on page 1 into an ri/ac/pv variable, and in the load() of the second screen, declare the gridSelection.selected with the selected value saved from screen 1.
  • 0
    Certified Lead Developer
    Hi RajHasti,

    I'm assuming that the grid on screen 1 (GridA) and the grid on screen 2 (GridB) both hold the same data. If that's incorrect, please let me know.

    In order to pre-select your chosen rows in GridB, you should save the selection from GridA via the SelectionSaveInto parameter, then carry that selection over to GridB on the next form, passing it into the initial calculation of GridB's SelectionValue parameter.

    For example, I'd have your forms setup like so:

    "Screen 1"
    "Rule Inputs" : ri!gridSelection /* Pass this to Screen 2 when the form submits */
    "Code":
    a!gridLayout(
    data: {...},
    selectionValue: ri!gridSelection,
    selectionSaveInto: ri!gridSelection
    )

    "Screen 2"
    "Rule Inputs" : ri!gridSelection /* Selection value from Screen 1 */
    "Code":
    a!gridLayout(
    data: {...},
    selectionValue: ri!gridSelection,
    selectionSaveInto: ri!gridSelection
    )

    If this doesn't answer your question, please feel free to let me know!