Attempting to push a record (item) to a board from an Excel DB using VBA. The script adds an item as intended from the try-it-yourself utility. (I built the script in the code and captured it from the function [strJSON] just to make sure it was identical.) The token (strToken) was taken from my account page, and was used in the utility as well. So, I am certain that there are no errors in the script, but just for clarity, here it is:
I don’t have a lot of VBA experience so I’ll let the community handle this However, I did notice something: you’ve got some strings-inside-strings in your column_values parameter. Can you ensure you’re escaping all strings and double-escaping nested strings? This will ensure your query is parsed correctly.
Thanks for the reply. I tried to push your “escaped” string into the try-it-yourself utility and it failed (where my example worked). Is the “escaping” different when pushed through code as I have described?
Hey @HydroCompDon, yes exactly. The try-it-yourself utility is automatically parsing your query as a string so you don’t need to explicitly define it as such (and if you do, it will fail).
However, when you pass a query to our server using an API call, you need to explicitly define the query as a string. Hence the double-quotes on the outside of the mutation and then " (escaped quotes) inside.
Essentially, escaping gives the server a way to differentiate pairs of quotes. For example, if we send "hello, my name is "Dipro"" to the server, it will parse "hello, my name is " as one string, ignore Dipro and then parse "" as the other string. But, if we send "hello, my name is \"Dipro\"", it will be able to differentiate the inner quote from the outer quote.