Custom Picker Field Null and Not Saving

Hello, 

I posted a couple of minutes ago about a dropdown field doing something similar to this except now it is a custom picker field. I put the code below although you cant test because it has a rule in it. If you want you its just countries so you can use USA, UNK, GER etc. The issue is that I need to save the value into the local variable array. Every time I select a option it just deletes the option and I have surmised it comes out of the issue of list of text vs list of null because list of null sets it to be blank and you can pick but list of text fills it with blanks regardless of null value being present in list of text. 


Here is the code: 

a!localVariables(
  local!pubProdCtry: cast(typeof({null}), repeat(4, null())),
  local!dataProdCtry1: cast(typeof({null}), repeat(4, null())),
  local!count: 1,
  local!datacount: 1,
  local!primary1: repeat(4, null),
  local!primary2: repeat(4, null),
  {
    a!cardLayout(
      contents: {
        a!forEach(
          items: enumerate(local!count),
          expression: 
          a!columnsLayout(
            columns: {
              a!columnLayout(
                contents: {
                  a!pickerFieldCustom(
                    label: "Producing Country",
                    labelPosition: "ABOVE",
                    placeholder: "--- Search by Name or GENC 3 ---",
                    maxSelections: 1,
                    suggestFunction: rule!queryCountriesAutocomplete(_),
                    selectedLabels: cast(typeof({""}), local!pubProdCtry[fv!index]),
                    value: cast(typeof({""}), local!pubProdCtry[fv!index]),
                    saveInto: local!pubProdCtry[fv!index],
                    required: true,
                  ),
                },
              ),
              a!columnLayout(
                contents: {
                  a!checkboxField(
                    label: "Primary",
                    labelPosition: "ABOVE",
                    choiceLabels: {""},
                    choiceValues: {true},
                    value: toboolean(local!primary1[fv!index]),
                    saveInto: {local!primary1[fv!index]},
                    choiceLayout: "COMPACT",
                    choiceStyle: "STANDARD",
                    validations: {},
                    align: "CENTER"
                  )
                },
                width: "EXTRA_NARROW" 
              )
            }
          )
        ),
        a!columnsLayout(
          columns: {
            a!columnLayout(
              contents: {
                a!buttonArrayLayout(
                  buttons: {
                    a!buttonWidget(
                      label: "Remove",
                      icon: "minus",
                      value: local!count - 1,
                      saveInto: local!count,
                      size: "SMALL",
                      style: "LINK"
                    )
                  },
                  align: "END"
                )
              },
              width: "AUTO"
            ),
            a!columnLayout(
              contents: {
                a!buttonArrayLayout(
                  buttons: {
                    a!buttonWidget(
                      label: "Add",
                      icon: "plus",
                      value: local!count + 1,
                      saveInto: local!count,
                      size: "SMALL",
                      width: "MINIMIZE",
                      style: "LINK"
                    )
                  },
                  align: "END",
                  marginBelow: "STANDARD"
                )
              },
              width: "EXTRA_NARROW"
            )
          }
        ),
      },
      height: "AUTO",
      style: "NONE",
      marginBelow: "STANDARD"
    ),

    a!cardLayout(
      contents: {
        a!forEach(
          items: enumerate(local!datacount),
          expression: 
          a!columnsLayout(
            columns: {
              a!columnLayout(
                contents: {
                  a!pickerFieldCustom(
                    label: "Data Producing Country",
                    labelPosition: "ABOVE",
                    placeholder: "--- Search by Name or GENC 3 ---",
                    maxSelections: 1,
                    suggestFunction: rule!queryCountriesAutocomplete(_),
                    selectedLabels: cast(typeof({""}), local!dataProdCtry1[fv!index]),
                    value: cast(typeof({""}), local!dataProdCtry1[fv!index]),
                    saveInto: local!dataProdCtry1[fv!index],
                    required: true
                  )
                }
              ),
              a!columnLayout(
                contents: {
                  a!checkboxField(
                    label: "Primary",
                    labelPosition: "ABOVE",
                    choiceLabels: {""},
                    choiceValues: {true},
                    value: toboolean(local!primary2[fv!index]),
                    saveInto: {local!primary2[fv!index]},
                    choiceLayout: "COMPACT",
                    choiceStyle: "STANDARD",
                    validations: {},
                    align: "CENTER"
                  )
                },
                width: "EXTRA_NARROW" 
              )
            }
          )
        ),
        a!columnsLayout(
          columns: {
            a!columnLayout(
              contents: {
                a!buttonArrayLayout(
                  buttons: {
                    a!buttonWidget(
                      label: "Remove",
                      icon: "minus",
                      value: local!datacount - 1,
                      saveInto: local!datacount,
                      size: "SMALL",
                      style: "LINK"
                    )
                  },
                  align: "END"
                )
              },
              width: "AUTO"
            ),
            a!columnLayout(
              contents: {
                a!buttonArrayLayout(
                  buttons: {
                    a!buttonWidget(
                      label: "Add",
                      icon: "plus",
                      value: local!datacount + 1,
                      saveInto: local!datacount,
                      size: "SMALL",
                      width: "MINIMIZE",
                      style: "LINK"
                    )
                  },
                  align: "END",
                  marginBelow: "STANDARD"
                )
              },
              width: "EXTRA_NARROW"
            )
          }
        )
      },
      height: "AUTO",
      style: "NONE",
      marginBelow: "STANDARD"
    ),
  }
)

  Discussion posts and replies are publicly visible