Skip to main content

Hi There,

 

I am a newbie, and having great fun creating my new Zap. I have tried to search help but didn’t find anything.

 

My Zap connected to our SQL - a query - and works well in sending an invoice to Xero as a result.

 

However I now what to add something to the Trigger.  

I only want the Trigger to work, if the value of a field is a particular value.

So I have made the trigger “New Row (custom query)” and I have added in the query

where ycluster] = “I”

but this doesn't work - “Incorrect syntax near the keyword 'where'. (156)”

what is the synax of a customer query?

 

My plan is to create several zaps that will use this value of cluster] to send the invoice to Xero, but use a different account code in Xero depending on the value of pcluster].

 

many thanks

 

ian

Hey @IanKerry ,

does it work to use a filter after your trigger? You can see how this works here. I also attached a screenshot for convenience.

I think this can help you to achieve the job. Instead of output, you should just use your specific variable and choose when the Zap should continue. Does that make sense?

Let me know!


Hey Ennes,

 

Thanks, I didnt realised that you could add filters and what if’s etc. That is great and I am sure now I will be able to get this sorted.

 

Thanks very much for your input.

 

Ian 

 


The problem likely lies with your SQL Query Statement, The SQL SELECT Statement doesn’t start with WHERE. The filter step should work but I would try to format my Select statement in proper syntax. 
SELECT column1, column2( or * to return all) FROM table_name WHERE Ecluster] = “I”

https://www.w3schools.com/sql/sql_select.asp


Ah OK, thanks GetuWired. I do a lot of SQL queries in Access, I didnt realise the same syntax was used in a Zap. So that will be very useful, thanks.

 

Ian