Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I would like to link an automation, creating a report and sending it to an e-mail address to an app.
By invoking the automation, the current users mail address should be retrieved and inserted as receiving address in the Send mail block.
Is that possible? I'm having trouble to find something about this for Qlik Enterprise SaaS.
Thanks for you response.
hi @RolfG for triggering through Qlik App Button. you need to follow below steps:
1. Create a variable vUserIDP in App Front end to store Current User who is triggering the button of Automation.
vUserIDP =Subfield(OSUser(),'=',-1)
2. Create another variable vU ser with no defintion. just create and keep it empty.
3.Create a button and give below actions in order mentioned below.
Action1 - set variable Value as shown in image( value = ='"'&vUserIDP&'"' )
Action2 - Execute Automation with below options enabled.
4. Click on Copy Input Block Button and go to your Automation and paste the blocks below the start block of your automation.
5. After Copying the above blocks please check the attached automation to get the user email.
Hi @RolfG you can use the Automation Json attached here for your requirement. Use the variable i created for recipients list as per your need for all users in your tenant.If you want the current user running the Automation then you can use GET CURRENT USER block of QLik cloud services.
If you want to trigger the automation from the app then you need to create a variable in the app that stores the subject id in that and then you need to fetch the value of that variable in the automation to get the email id by using that subject.
Hi @salmankojar
thank you very much for your response. I've tried to use the new GET CURRENT USER ID first, than GET USER and in the SEND MAIL block I can extract the mail from the user object.
The output in the history looks ok, but initiating the automation by an other user results in sending the output to my mail adress. Either GET CURRENT USER ID does not work properly at that time (because it is experimental) or there is something about caching the information or my sequence is wrong. Concerning the caching, I'm unsure about is, what settings I should use for caching (None, end of automation or a specific time).
Sequence of my automation looks like this:
Hi @RolfG How do you initiate the Automation? Through Qlik App or any other way?
I want to initiate it by a button from within a qlik app
hi @RolfG for triggering through Qlik App Button. you need to follow below steps:
1. Create a variable vUserIDP in App Front end to store Current User who is triggering the button of Automation.
vUserIDP =Subfield(OSUser(),'=',-1)
2. Create another variable vU ser with no defintion. just create and keep it empty.
3.Create a button and give below actions in order mentioned below.
Action1 - set variable Value as shown in image( value = ='"'&vUserIDP&'"' )
Action2 - Execute Automation with below options enabled.
4. Click on Copy Input Block Button and go to your Automation and paste the blocks below the start block of your automation.
5. After Copying the above blocks please check the attached automation to get the user email.
Hi @salmankojar ,
thank you very much for your anwser. Before I mark your anwser as a solution, please correct one thing, so that others can learn from it. 🙂
I had to delete the Block GET CURRENT USER ID and select the User from the result of the new INPUT Block as input to the GET USER block.
That worked
Hi @RolfG Thankyou for reminding the typing mistakes..actually i was doing other work side by side.i have corrected the mistakes.i hope i have solved your problem.