Can someone tell me how to insert my noted Hubspot properties into the code shown? I expect this is not the best way to do this, but I’m just limping through getting this to work. This code currently will prefill and submit a MS form from a custom coded HS workflow.
Right now the underlined values are hard coded and I’d like them to be HS properties.
I’ve googled and found a variety of answers, maybe something like adding +kone_po_chanages+ and possibly needing a “\” or double curly brackets. I just can’t find the right combination of characters.
Thank you for this response. I think I’m close here, but I noticed in your code examples you removed the back slashes. Should I be doing the same? This is giving me error “7:112 PARSING ERROR - UNTERMINATED TEMPLATE”
OK so now closer still. I’m executing this code in HS and it’s showing as successful, no errors, I’m also using a test MS form and I’m seeing the form submitted, but the values in the HS properties are not pushing over. The values were pushing over previously when I had the values hard coded. (not referencing variables/properties)
This is the spreadsheet that populates each time a form is submitted. row 30/31 were submissions from the HS custom code and row 32 is a test push from postman. (Postman has the values hard coded)
I also changed answer to answer1 (because that’s how it was in my working code) and I removed the reference and just put back in a hard value and those are not transfering either.
OK well I’m fried for the day. I’m calling it. I alternately tried both line 9 and line 10. Both still submitted blank forms. For kicks I changed answer to answer1 (as shown in Postman) and the form doesn’t even submit when I do that. So I still can’t push any value over, hardcoded or HS property.
Hard to say without seeing the full code but there are a few things I notice that could be the issue.
One of them is that we’re passing the answers as a string instead of an array and the others could be potential “typos” in the labels and the values from copy/pasting.
Try replacing the “data” variable with this format. I intentionally made question ids be XXXXXXXX so that you could paste it from the source (instead of this thread)
OK I finally got it going. There were two problems. One of the question ID’s was wrong and it turns out I did need “answer1” and not just “answer”. So you were right, both typos in labels and an issue when I cut/paste the ID’s.
I was able to get this to work with both line 9 and line 10.
Thanks so much for your help! I absolutely never would have figured this out on my own.