I tried something like… {“field_73544[0].id”:“4”} … and that didn’t work…
In this case, the current id is 1 for the first technician in the list… I want to change it to the 4th technician in the list… field_73544 is the technician array field …
The request body should be a JSON object containing all the fields you want to update. if you’re unfamiliar with JSON, this page on the mozilla docs is a great resource.
Also, you need to pass in the entire array of technicians, exactly in the order you want it, to update the field, because whatever data you pass in for the field will be set as that field’s value.
I’ve got a a column that is a multiple select listing all of my technicians… in that same select, there is a value called “unassigned”… so the multiple select values would be Jim, Tim, John, Kevin, Unassigned…
So essentially I am trying to create link that patches and changes the Technician selected…
So for example, lets say Row 1, Technician has a value of Unassigned…
Using the method you list above:
{
“field_81781”: “test”
}
Works if the value is not an array…
But if I want to change row 1 from Unassigned to Tim, what Json style would I use in this case…
I’m afraid I don’t follow your suggestion to list the whole array…
That’s the user field name (the name that shows up on Baserow). If you have the user_field_names query parameter set to true in your request, then you have to use those names instead of the names like field_81781.
I just realized, I think you might be confused about what the option IDs are. For a select field, the option IDs aren’t related to what order the options are in the list. The option IDs are listed in the database API documentation under the “Fields” section. it should look like this:
So if the technicians are listed in another table, can I refer to the other table to update the tech name?
IE
{
"field_73544": [
{
"field_73534": "Tim"
}
]
}
The technician table ID is in table 10120 and the tech names are field 73534 where “Tim” is one of the names… The above code doesn’t work so I’m just not sure if it is impossible or if the technician table needs to be mentioned in the JSON…