Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is there a way to populate the USER.EMAIL in the App on Qlik Cloud? So when a user accesses the app it will show a greeting? Welcome nhoover@ABC.com
Thanks all!
As @cristianj23a referenced, the simple method is to use the OSUser() function but this does only display the user's subject in Qlik Cloud:
(Using Qlik ID thus no meaningful subject)
(using a custom IDP where we have crafted a meaningful subject)
But in many circumstances, this isn't a meaningful value so there are use cases where the user's email is preferrable. For this use case you can use the Advanced Analytics connector in the app like so:
The resulting KPI object will look like this:
In Qlik Sense Cloud, you can use a feature called "Session Variables" to display the user's email or any other information in the app. Session Variables allow you to store and access data specific to each user's session within the app.
To display the user's email in the app as a greeting, follow these steps:
Open your Qlik Sense app in the Qlik Sense Cloud.
Go to "Data load editor" (or "Edit Script" in older versions of Qlik Sense).
At the end of the script, add the following code to store the user's email in a session variable:
SET vEmail = OSUser();
The OSUser() function retrieves the email of the currently logged-in user.
Save and reload the data to make the variable available for use in the app.
Now, in the app, you can add a text object or a text box to display the greeting. Edit the text object properties and use the following expression to show the greeting message:
='Welcome ' & '$(vEmail)'
This expression concatenates the static text "Welcome " with the value stored in the session variable vEmail, which holds the user's email address.
Save the changes to the app.
Now, when a user accesses the app on Qlik Cloud, the greeting message will dynamically show their email address.
Please note that the OSUser() function is only available in certain editions of Qlik Sense, such as Qlik Sense Enterprise and Qlik Cloud Business. If you are using Qlik Sense Desktop or other editions, you may need to explore alternative methods to get the user's email address, such as using a login extension or integrating with an identity provider.
regarts.
As @cristianj23a referenced, the simple method is to use the OSUser() function but this does only display the user's subject in Qlik Cloud:
(Using Qlik ID thus no meaningful subject)
(using a custom IDP where we have crafted a meaningful subject)
But in many circumstances, this isn't a meaningful value so there are use cases where the user's email is preferrable. For this use case you can use the Advanced Analytics connector in the app like so:
The resulting KPI object will look like this:
Thanks for the response and detailed instructions! This doesn't seem to work as I expected with how our tenant is setup. Example below.
Thanks Levi, very detailed response and looks just like what I need to figure out my problem. Thanks for pointing me in the direction to master this issue.
For some reason, I don't have access to this connection in the data load editor...I'm following up with support. Thanks Again all!
Hmm, it may be that your tenant does not have the machine learning endpoints enabled:
Bingo I toggled the setting on, and am not exploring the new Connection option. Thanks Levi!
I am getting an error: "Error in expression: ')' expected"