Error when saving table changes (Tags column PoleNaObal) with MSSQL

Description

We are encountering a validation error when saving changes from a Retool table that contains a Tags column (PoleNaObal). The issue started yesterday; previously the same functionality worked correctly.

The problem occurs during a Bulk update via primary key operation.

Environment

  • Retool

  • Database: MS SQL Server

  • Tested with DB connector v1.0 and v3.0

  • Same behavior in both versions

Query configuration

  • Table: dbo.Viewx_AKINU_KK_Alfred_base

  • Primary key: ID

  • Action type: Bulk update via primary key

  • Records source:

    {{ tableAlfred.changesetArray }}

**Example data from changesetArray
**
[
{
"PoleNaObal": [
1,
2,
3,
4,
75,
6,
16,
17,
18,
19,
20,
21,
29,
30,
31,
32,
33,
34,
58,
60,
61,
62,
63,
64,
72,
73,
74,
76,
77,
242,
243,
14,
27,
247,
246,
244,
245,
250,
251,
248,
249,
255,
254,
252,
253,
307,
303
],
"ID": 17513
}
]

**Generated SQL
**
update [dbo].[Viewx_AKINU_KK_Alfred_base]
set [PoleNaObal] = @p0
where [ID] = @p1;

**Error message
**
Validation failed for parameter 'p0'. Invalid string.

Additional notes

  • The issue appears only when saving the Tags column (PoleNaObal).

  • Retool sends the value as an array, but the MSSQL parameter validation expects a string.

  • Other columns in the same table update correctly.

  • The error occurs in the query tableAlfredSaveHandler.

No answer?I found workaround like this:

{{
tableAlfred.changesetArray.map(r => ({
...r,
PoleNaObal: Array.isArray(r.PoleNaObal) ? r.PoleNaObal.join(',') : r.PoleNaObal,
PoleNaObalStavajici: Array.isArray(r.PoleNaObalStavajici) ? r.PoleNaObalStavajici.join(',') : r.PoleNaObalStavajici
}))
}}

David

Thanks for sharing an update, @Davidkm!