Problems when updating CDT array of cdts inside an interface.

Hi!

This question may be a bit silly but I am starting with appian.
I'm having problems with some variables in my interface.
When I create one cdt in the "Turno" cdt array for the first time and then enter the value "Extras" through the dropdown, the "Eliminar curso" button, which supposedly deletes an element from the cdt array "turn", doesn't do it.
And alse, the "Extras" selection dropdown stops working and dont save the number.

Here is my code:
a!boxLayout(
              label: "Junio",
              contents: {
                a!localVariables(
                  local!shiftExist: 'type!{urn:com:lv:mr}LV_MR_SHIFTS'(numero:1),
                a!columnsLayout(
                  columns: {
                    a!columnLayout(
                      contents: {
                        a!textField(
                          label: "",
                          labelPosition: "ABOVE",
                          value: local!shifts[1],
                          saveInto: {},
                          refreshAfter: "UNFOCUS",
                          readonly: true,
                          validations: {}
                        ),
                          a!buttonArrayLayout(
                            buttons: {
                              a!buttonWidget(
                                label:
                                  if(index(where(a!forEach(
                                  ri!LV_MR_Members.turno,
                                  if(
                                    fv!item.numero = 1,
                                    true,
                                    null
                                  )
)),1, false),
                                "Eliminar turno",
                                "Añadir turno"),
                                value: if(index(where(a!forEach(
                                  ri!LV_MR_Members.turno,
                                  if(
                                    fv!item.numero = 1,
                                    true,
                                    null
                                  )
)),1, false),
                                null,
                                'type!{urn:com:lv:mr}LV_MR_SHIFTS'(
  numero:1
)),
                                saveinto: if(index(where(a!forEach(
                                  ri!LV_MR_Members.turno,
                                  if(
                                    fv!item.numero = 1,
                                    true,
                                    null
                                  )
)),1, false),
                                a!save(ri!LV_MR_Members.turno, remove(ri!LV_MR_Members.turno, wherecontains(local!shiftExist, ri!LV_MR_Members.turno))),
                                a!save(ri!LV_MR_Members.turno, append(ri!LV_MR_Members.turno, local!shiftExist))),
                                style: "NORMAL"
                              )
                            },
                            align: "START"
                          )
                      }
                    ),
                    a!columnLayout(
                      contents: {
                        a!dropdownField(
                          label: "Extras",
                          labelPosition: "ABOVE",
                          placeholderLabel: "Seleccione el horario de desayuno deseado",
                          choiceLabels: {
                            "Desayuno 1 (7:30 AM)",
                            "Desayuno 2 (8:00 AM)",
                            "Desayuno 3 (8:30 AM)"
                          },
                          choiceValues: {
                            1,
                            2,
                            3
                          },
                          /*value: ri!LV_MR_Members.turno[wherecontains(local!shiftExist, ri!LV_MR_Members.turno)].desayuno,*/
                          saveInto: ri!LV_MR_Members.turno[wherecontains(local!shiftExist, ri!LV_MR_Members.turno)].desayuno,
                          showwhen: if(index(where(a!forEach(
                            ri!LV_MR_Members.turno,
                            if(
                              fv!item.numero = 1,
                              true,
                              null
                            )
)),1, false),
                          true,
                          false), 
                          validations: {}
                    
                        )

And here my rule inputs:

If anyone could give me some advice it would be great.

Thanks in advance!

  Discussion posts and replies are publicly visible