When working with an object of array query result, if you did not include the array index, Retool would assume the first element.
Take this query:
update [dbo].[invoices] set
[status_id] = {{status_id}},
[po_number] = {{txtPONumber.value}},
...
[ship_type_id] ={{selShipType.value}}
where [invoice_id] = {{qryInvoicesSelect.data.invoice_id}}
qryInvoicesSelect.data.invoice_id only every has a single result which represents the current invoice being edited. qryInvoicesSelect.data.invoice_id would always return the first, and only, element. That just changed and an invalid string error is the result.
I now have to specify the index like so: qryInvoicesSelect.data.invoice_id[0]
Now this was bad practice on my part and I only have a few places in older apps that do this. And it probably should not have never worked in the first place. So on me at least partly, but it still broke a client's app today.
so thats what happened!! man thanks for caring to figure out what was going on, I just figured I did something dumb and had to go back and add an index for some random reason. I wasn't sure if my workflow result or query result was different or why, turns out neither technically i guess heh (other than the poor design choice club you and me are apparently President and CEO of )
@bradlymathews Thanks for the info! I guess the resource type on Retool that you're using for Azure SQL is "Microsoft SQL" right? Just checking, do you have prepared statements enabled or disabled for the resource?
@bobthebear Can you share your Retool resource type as well?
Hi @bradlymathews and @bobthebear, we can reproduce this change and are looking into exactly what caused this change. We likely won't revert back to the old behavior as the new behavior is technically more correct.
I'm very interested in the outcome of your investigation, since I ran into exactly the same issue where our production environment suddenly stopped working.