Select only one choice in grid selection

Hello,

I'd like to be able to select only one choice in a grid selection at the same time.
Is there a way to force that?

OriginalPostID-202357

OriginalPostID-202357

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    I had a similar requirement and didn't want to give a validation error message.
    The intention is to automatically change the selection to the latest selected value in the grid. When User selects check all it persists the value that was selected before this operation.

    This is done as below in Grid's SaveInto

    saveInto: {
      local!gridSelection,
      a!save(
        local!gridSelection.selected,
        if(
          rule!APN_isEmpty(
            local!gridSelection.selected
          ),
          {},
          if(
            length(
              local!gridSelection.selected
            ) > 2,
            index(
              local!gridSelection.selected,
              1,
              ""
            ),
            index(
              reverse(
                local!gridSelection.selected
              ),
              1,
              ""
            )
          )
        )
      )
    }

Reply
  • 0
    Certified Lead Developer

    I had a similar requirement and didn't want to give a validation error message.
    The intention is to automatically change the selection to the latest selected value in the grid. When User selects check all it persists the value that was selected before this operation.

    This is done as below in Grid's SaveInto

    saveInto: {
      local!gridSelection,
      a!save(
        local!gridSelection.selected,
        if(
          rule!APN_isEmpty(
            local!gridSelection.selected
          ),
          {},
          if(
            length(
              local!gridSelection.selected
            ) > 2,
            index(
              local!gridSelection.selected,
              1,
              ""
            ),
            index(
              reverse(
                local!gridSelection.selected
              ),
              1,
              ""
            )
          )
        )
      )
    }

Children
No Data