Converting a map of objects to an array of CDTs

Hi

I've recently been experimenting with with Grid components. I'm currently using the read-only grid and it's `fv!selectedRows` variable to pull out the full object of data from each object selected.

`fv!selectedRows` returns a map of objects, but I would like to have an array of CDTs so that I can then pass it onto my process model.

I wondered what would be the most efficient way to cast the map to an array of CDTs?

Thanks in advance!

Note: I am using 19.03

  Discussion posts and replies are publicly visible

Parents
  • I'm currently doing the following:

    a!save(
      target: local!SelectedRows,
      value: save!value
    ),
    a!save(
      target: local!SelectedSites,
      value: append(local!SelectedSites, fv!selectedRows)
    ),
    a!save(
      target: local!SelectedSites,
      value: difference(local!SelectedSites, fv!deselectedRows)
    ),
    a!save(
      target: ri!SelectedSites,
      value: a!forEach(
        items: local!SelectedSites,
        expression: cast('type!Site', fv!item)
      )
    )

Reply
  • I'm currently doing the following:

    a!save(
      target: local!SelectedRows,
      value: save!value
    ),
    a!save(
      target: local!SelectedSites,
      value: append(local!SelectedSites, fv!selectedRows)
    ),
    a!save(
      target: local!SelectedSites,
      value: difference(local!SelectedSites, fv!deselectedRows)
    ),
    a!save(
      target: ri!SelectedSites,
      value: a!forEach(
        items: local!SelectedSites,
        expression: cast('type!Site', fv!item)
      )
    )

Children