Help

UNKNOWN_FIELD_NAME even if request doesn't include that field

Topic Labels: API
2123 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Emanuele_Pecora
4 - Data Explorer
4 - Data Explorer

Hello,
I’m getting the following error:

Class {

error: ‘UNKNOWN_FIELD_NAME’,
message: ‘Unknown field name: “2019-09-16”’,
statusCode: 422 }

in a select from a view with the following config

{
"maxRecords": 1,
"view": "Employee data",
"filterByFormula": "AND({SlackId} = 'UD5UYN55L', {Active})",
"fields": [
    "Firstname",
    "Lastname",
    "ATEmail",
    "SlackID",
    "Office",
    "Type",
    "Team",
    "AutoCreateNextWeek"
]

}

where the field marked as unknown is not present.

This is my code:

let getActiveEmployee = (slackId, airtableClient) => {    
var config = {
    maxRecords: 1,
    view: "Employee data",
    filterByFormula: "AND({SlackId} = '" + slackId + "', {Active})",
    fields: fields
}

var select = airtableClient('Dispatch').select(config)

console.log("config1: " + JSON.stringify(config))

return new Promise((resolve, reject) => {
    select.firstPage((err, records) => {
        if (!err) {
            if (records.length > 0) {
                console.log("build employee")
                const employee = new Employee(records[0])
                console.log("employee: " + JSON.stringify(employee))
                resolve(employee)
            }
            else {
                console.log("Employee: null")
                resolve(null)
            }
        }
        else {
            console.log(err)
            reject(err)
        }
    })
})

}

Could someone why?

Best

0 Replies 0