Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sherazade
Contributor III
Contributor III

Is it possible to fill up User preferences/mail using variables??

Hi all,

I would like to fill email data ( username, password, server etc ) located in user preferences using variables instead of typing them.

is it possible? How?

Can I see an example of how to do it?

thanks a lot!

6 Replies
salto
Specialist II
Specialist II

Hi,

do you want to use QV to write data somewhere?

sherazade
Contributor III
Contributor III
Author

Hi Salto,

I would like to place some conditional "script" to change the mail data depending on different selections,  for example QVUser() "A" has  smtp.usera.com,

QVUser() "B" has smtp.userb.com

salto
Specialist II
Specialist II

Hi,

there are several triggers that can be fired when opening the document.

They are available in Settings -> Document Properties -> Triggers -> Document Event triggers -> OnOpen

There you can set the values of a variable (let's say vSMTPserver) depending on the result of the QVUser() function: Actions -> Set Variable vSMTP to Value: if(QVUser()='A','smtp.usera.com','smtp.userb.com')

Hope this helps.

Regards.

sherazade
Contributor III
Contributor III
Author

Hi Salto,

maybe I did not explain well my problem or I do not understand your kind answer:

Trigger, as suggested,  fills variable "vSMTP" to the proper value depending on qvuser() , see attached image trigger1

Problem is that still user preferences mail  "server" cell remains empty.   see attached image upref

This happens because "user pref / mail/server address variable" has a different name fron vSMTP?

where can I find system variables for all the relevant fields:

sender name

sender address

server address

server port

auth method

user id

password

thanks again!!!!!!!

upref.jpgtrigger1.jpg

salto
Specialist II
Specialist II

Hello,

sorry, I had not understood your question. Now I have!

I do not know if these settings can be changed from within the document.

A possibility is to write a macro in the document, in which you can set the smtpserver, user, password, port, depending on the values of the variables, etc... and send the required emails (have a look at community.qlik.com/thread/74788)

Hope this helps!

suniljain
Master
Master

You can maintani table for username, password, server ans so on and use that data in to dashboard as a variable or as a field.

Regards;

Sunil