Hi Team, I am facing an issue while using radio buttons in editable gridLay

Hi Team,
I am facing an issue while using radio buttons in editable gridLayout. Radio button selections are not getting refreshed, we have tried attached code snippet. As per my observation, when I try to display the local!itemsToken array in From Layout/Grid Layout's Label then the radio button selections work fine else it is not updating the selections.

Could you please advise? Any help is appreciated!

Interface.txt

OriginalPostID-162023

OriginalPostID-162023

  Discussion posts and replies are publicly visible

  • I think using the itemsToken array does not work that way. What do you intent to do? Using radiobuttons to allow the user to select a single item only? For that you would need a separate boolen array. I have no working code, but this could be a start

    a!radioButtonField(
    label: "select " & ri!index,
    choiceLabels: {""},
    choiceValues: {true()},
    value: index(ri!selectedBooleanArray, ri!index, false),
    saveInto: {
    a!save(ri!selectedBooleanArray, updatearray({}, ri!index, true)),
    }
    ),
  • If the radio button value is part of local!items array (say boolean variable isActive) then you can use something like this below.
    a!radioButtonField(
    label: "select " & ri!index,
    choiceLabels: {"Yes", "No"},
    choiceValues: {true(), false()},
    value: ri!items[ri!index].isActive,
    saveInto: ri!items[ri!index].isActive
    )

    We can help if you provide more info on what you are trying to achieve.