Debug errors on AddionalScope Variable

I have a form in which my user can create a new client. This client can be attached to an address, my user can choose if this is a new address or pick a known address from a drop-down.

Depening on this choice, i'll run a JS-Code which triggers or an Insert in the client table, or first an insert in the address table, get the results, and use these in the client insert.

The problem is, this additionalScope is not being defined until the JSCode runs, but for some reason my debug screen got flooded with errors the moment i'm filling the form (every keypress creates an error line) - telling me the 'coradres'(my variable) is not defined (which is also mentioned in the documentation)

Do I use additionalScope in a wrong way, or is a setting in my form which is causing this? Or maybe something else?


debugScreenShot

Hey @Ronaldvm!

It looks as though you have additional scope set up correctly here. Odd that the query is being prompted to trigger so many times. Would you mind sharing the configuration of the form you're using as well as the individual components themselves?

Also, if you wouldn't mind me stepping into your app, I'm curious to take a look around to see if I notice anything.

You are more as welcome to take a look at my app, what information do you need to access the details?

Would you like screenshots, or is there an easier way to share the configuration?

The odd thing, there are a couple of different elements on this form (email itextinput, segmented control, switch, textinput). Only the first two (required) textboxxes are causing this error .The email-text-boxxes won't cause the error.

Thanks for that! It looks like I'm able to repro it on my end and will alert the dev team. When you do trigger the query via the submit button is it running as it should? It seems like these errors are innocuous but I want to double-check that your flow is working properly.

Thanks for the investigation,

Yes, the submit button does it's job and running the query. Moreover, the query which is mentioned in the error, is not the query triggered directly by the submit (although, this query being triggered by the JS which is initially triggered with the submitbutton).

Errors seems to be innocuous, but it's quite messy and distracting in the console..

Definitely, it's something we'll want to make sure to fix either way. I'll let you know here as soon as we've done so!

1 Like