In order to be able to use the WITH CONNECTION syntax you need to be using the very latest version of Qlik Sense, this feature hasn't been available for long (and I've not migrated my code to use this syntax yet).
With the previous method (of putting the script into legacy mode and building a URL) there were some characters which needed to be HTML encoded in the password.
Can you set the password temporarily to a very simple password, without potentially problematic characters?
Thanks for the quick response.
I have tried with a password containing only letters(capitals aswell) and numbers. and it does give the same error.
(guessing letters and numbers don't need encoding)
BTW when using something else than the with connection( I think I just had the connection string in which I replaced some stuff) I had to replace somethings in the email adresses for example, with the URL encoded things. With the with connection this isn't needed for these characters(email).
Any other ideas?
The function that I use for encoding things with QWC is this:
sub Encode(vEncodeMe, vEncoded)
let vEncoded = replace(replace(replace(replace(replace(replace(replace(vEncodeMe, ':', '%3a'), '/', '%2f'), '?', '%3f'), '=', '%3d'), '\', '%5c'), '@', '%40'), ' ', '+');
I suspect there are other characters that need escaping, but that has covered all bases that we have come across so far.
What makes you think that it is specifically the password that is causing the issue?
Can you send an email from the QWC web page using the parameters there?
The error seems to suggest that there is something odd about the data that is coming back in the result set. Can you get to those results some other way to check that they are what you are expecting?
Ty for the encode sub
The app is already running and is fine with the code I got. I have variables that I use to set the correct parameters. When I put in a Password it fails. (if no Password is entered the query is not added to the with connection)
I want to deploy the app with customers without too much configuring to do.
At the moment I need to go to the notification connector and put in the info there to make it work. Within the script I can change everything I setup in the notification connector but not the Password.
So in short it all works in QWC and in app if I setup the password in QWC.