Save a value in a custom Picker

Hello, does anyone know how I can make a custom picker to save the value if it is not in the list?

The code is that:

                              a!pickerFieldCustom(
                                label: "Tipo de entrada",
                                labelPosition: "ABOVE",
                                maxSelections: 1,
                                suggestFunction: rule!ERYM_FiltroComponente(
                                  filter:_ , 
                                  labels: local!tipoEntrada, 
                                  identifiers: local!tipoEntrada
                                ),
                                selectedLabels: a!forEach(
                                  items: ri!expediente.tipoEntrada,
                                  expression: index(local!tipoEntrada, wherecontains(fv!item, local!tipoEntrada))
                                ),
                                value: ri!expediente.tipoEntrada,
                                saveInto: ri!expediente.tipoEntrada,
                                showWhen: a!isNotNullOrEmpty(ri!expediente.inTipoExpediente),
                              ),

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to Andrei Alexandru Mois

    You can take his concept of appending new values to the list. 

    Have a text input side by side with the pickerfield with a button add to list.

    If you search in pickerfield and it does not exist type it in the textbox and click add to list button. You can even append it to the selected values in the pickerfield in the buttons save parameter using a!save() like this you don't need to retype it in the picker field. If you don't like the button you can just keep the textbox by itself and save on UNFOCUS etc 

Children
No Data