Record Picker component is not working

I am trying to implement a record picker component within a form layout. For some reason is not working the way it should be. After implementing the expression code below the search results appears to be "No results found" when I tried to search for something using the component. I have created a constant (cons!ERP_PROVIDER_RECORD) that points to the record type and a local variable to hold the selected records. What I need to do is to find a way to fetch a list of providers (which are already stored in the backend) so the user can pick them to complete the form.

Here is the expression code:

a!pickerFieldRecords(
label: "Proveedores Seleccionados",
labelPosition: "ABOVE",
placeholder: "Escriba para seleccionar proveedores",
recordType: cons!ERP_PROVIDER_RECORD,
value: local!storedRecord,
saveInto: local!storedRecord,
validations: {}
)

Please help to fix this issue.

  Discussion posts and replies are publicly visible

Parents
  • One of the most common sources for a misbehaving record picker that I've seen is when the Record Title is missing, which defeats the type-ahead as there's no record title to display inside the picker. 

  • Hi Jim, I still having a small issue with the record picker... for some reason when I try to use a!save() to store the selected records on a rule input field it appears to be empty []  even though I have some records selected.

    Do you have an idea of why this is happening?

    Here is how my code looks like right now:

    a!pickerFieldRecords(
                label: "Proveedores Seleccionados",
                labelPosition: "ABOVE",
                placeholder: "Escriba para seleccionar proveedores",
                recordType: cons!ERP_PROVIDER_RECORD,
                filters: a!queryFilter(
                  field: "category",
                  operator: "=",
                  value: ri!ERP_Purchase_Request.category
                ),
                value: local!storedRecord,
                saveInto: local!storedRecord,
                required: true,
                validations: {}
              )

    And this code I have when the user click on submit in the form:

    saveInto: { 
        a!save(ri!ERP_Purchase_Request.providers, local!storedRecord)
    },

    My CDT:

    The output when the user click on submit:

Reply
  • Hi Jim, I still having a small issue with the record picker... for some reason when I try to use a!save() to store the selected records on a rule input field it appears to be empty []  even though I have some records selected.

    Do you have an idea of why this is happening?

    Here is how my code looks like right now:

    a!pickerFieldRecords(
                label: "Proveedores Seleccionados",
                labelPosition: "ABOVE",
                placeholder: "Escriba para seleccionar proveedores",
                recordType: cons!ERP_PROVIDER_RECORD,
                filters: a!queryFilter(
                  field: "category",
                  operator: "=",
                  value: ri!ERP_Purchase_Request.category
                ),
                value: local!storedRecord,
                saveInto: local!storedRecord,
                required: true,
                validations: {}
              )

    And this code I have when the user click on submit in the form:

    saveInto: { 
        a!save(ri!ERP_Purchase_Request.providers, local!storedRecord)
    },

    My CDT:

    The output when the user click on submit:

Children