Expression not working in MySQL Query

I can make an SQL Query when I type it all out without using any expressions in it. But the second I try and pull data from a previous node in an expression, it gives me an error.

Here is a short 45 second video as I am still learning how to describe things well with this new and exciting software for me!

Hey @coachmikemonte,

That video is very handy, The issue is not all of your input data has that field with a value in it.

image

When it hits the third run “On - English” is null, What you can do is put an If before it to make sure you only run the query for items that contain a valid value or you can set a default value by adding something like {{xxx || 0}} where xxx is the variable in the current expression.

2 Likes

Hey @Jon. Thanks for that. My next issue is that I want to iterate the array in the items list, then query MySQL for the first item and then update the rows associated with that item, then query MySQL again for the second item, then update those rows, etc.

In Integromat the flow was naturally processed this way. Here it works a little different and I’d love to know how to replicate this but am stuck.

Here is another “handy” video, haha.

1 Like

Hey @coachmikemonte,

Took me a bit longer on this one to work out what was going on, So you are selecting the first empty item then you want to assign it and then get the first 11 items which wouldn’t include the one that has been previously set…

This is where the Split in batches would come in, Pop one in before that query then add everything else and make sure you loop back to the start of the split in batches node at the end of each run so that it can pick up the next value.

1 Like

You are amazing @Jon!

1 Like