Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am using the Notification connector in an app that creates email alerts when Reload tasks fail. We are deploying the sollution with customers. But having one problem with the username password for the SMTP server.
QUERY "Password" "$(AlertEmailPassword)",
gives an error in:
My quess is that the Password query is invalid? Any help would be welcome
Hi Bram,
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?
Steve
Hi Steve,
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'), ' ', '+');
end sub
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?
Steve
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.
Ah, I see. It's not something silly like capitalisation, e.g. password or PassWord?
It is literally that if you omit that one line it works fine?
Thats what I was thinking, but tried some possibilities and no joy.
Yep only this line breaks it.
too bad, thanks anyways
The with connection statements are nice to use except for this little problem.