Custom update query parameters - strange behavior

I notice that whenever I use more than 1 param it either doesn’t work or just copies values from the 1st param…
I was trying to get to the bottom of this so I set up a test page with a query and server connect form like this:

(all the fields are properly named and tested with a database update action)
now I set up a simple custom query using just one of the fields
this works as intended:

However, if I want to update another row and add another parameter like this:
I’m getting the same value used in both rows:

And, of course if I try to use the Id field and yet another param it won’t do anything as it’ll probably want to use :P1 for it…

Now I know that what I’m doing here can be done with Database Update action but I hoped to do something a bit more complicated than that… Also I want to add a line break - which doesn’t work in expression builder as far as I can tell…

Has nobody had this problem?

Your screenshots are really tiny and it’s not clear what are you doing and what is wrong?

Also - why not use the built in Database Updater? Why would you use a custom query for this when there’s already a component doing it?

Hi Teodor,
as for the screenshots I’m not sure why only some of them let you zoom in and others don’t.

The main problem is that whenever I try to use more than one parameter in a custom update query only the first one is recognized and used…

I realize that what I’m doing in this example can be done much faster with the Database Updater but there seems to be no way of inserting a line break. In custom query I can just use CHAR(13) for that but it doesn’t work in the update action…

Where and how do you need to insert a line break?

I’m doing a sort of a history log. So we can see when a product was added to the database, pacaged, sent etc… It looks something like this:
where each update goes into a new line… each line has a timestamp, some description and username - all those are essentially different parameters…

So are you not storing each of the events in the log in a new table row and reference it to the product??

Well that would be another way to do it… This way everything is in one table and once it gets archived after a couple months it’s a bit easier to manage… I did consider doing it the way you mentioned but for now I need to make sure everything’s compatible with the old system.

You can try this:

{{$_POST.value + "\n"}}

as a value for the update record step.

sadly this doesn’t work…

gives this as output:

I see. We are going to check this.

Did you check the value directly in the database?

The expression {{$_POST.value + "\n"}} returns a string with a newline at the end, I have tested this. So I want to know how the actual value is stored in the database and how the JSON result from the sever connect looks like.

yup it looks exactly the same in the database i.e. with the actual “\n” inside the string…

not quite sure what it is that you need me to show you

is this what you meant?
or this:

did you manage to fix this and if so, how?

Edit: got it solved with this, Problem with custom query params