Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
visu12
Contributor II
Contributor II

Sheet title image change based on user logged in

My requirement is to change the sheet title image based on the user logged in. Our dashboard is accessed by different clients and I want to display  the image based on user logged in.

Qlik Sense Enterprise on Windows 

Labels (1)
1 Reply
AustinSpivey
Partner - Creator
Partner - Creator

Unfortunately you cannot dynamically change the app thumbnail or header image.

You can get creative, however, for showing an image dynamically in the sheet itself. There are almost certainly a few extensions that would allow you to achieve this, but if you are constrained to using only out-of-the-box Qlik objects, you could achieve this using the Map object.

You could use the OSUser() function to dynamically determine who is viewing the app. Depending on how you have it set up, you could use the client domain name to determine which client logo to show.

It would look something like this:

  1. Open the app and go to the app information section by click on the app name at the very top-middle of the page. Then click on the image icon:
    AustinSpivey_0-1682568288372.png

  2. Select the Upload media button and choose the client logos/thumbnails/images you'd want to use. (By the way, you can skip this part if these images are already hosted in a place where Qlik can reliably and legally access them). Close this when you are done.

  3. Add a map to your sheet. Go to the map properties and change the Base map option to "None". Set the Selection method option to "None". Then go to the Legend tab and toggle it off. Then go to the Presentation tab and toggle off the "Scale bar" option.

  4. Add a Background layer to the map. In the Format dropdown, choose the "Image" option. In the URL field, use this expression:
    ='https://localhost:9933/appcontent/54e0f2de-db95-4e7a-8090-536c71656170/'
    & Pick(Match('$(vCurrentClient)', 'GHJUSERS', 'IOPDOMAIN', 'XYZAZURE')
      , 'GHJ-pic'
      , 'IOP thumbnail'
      , '2023 XYZ logo'
    ) & '.png'

    Just replace the localhost:9933 part with your Qlik hostname (whatever is normally in your URL when you use Qlik), replace that app ID with the ID of you current app (also available in your URL). 

    The other important part here is the stuff inside the Pick(Match(...)). The arguments in the Match() function are the possible user directory values you'd want to show a dynamic image for. The arguments to the Pick() function are the matching file names for those images files you uploaded in the previous steps.

  5. In the Top (latitude) field, put 7. In the Left (longitude) field, put -11. In the Bottom (latitude) field, put -7. In the Right (longitude) field, put 11.

  6. Add an area layer to the map. Set the dimension to =1. In the Location tab, use this in the Location field:
    '[[-11, -7],[-11, 7],[11, 7],[11, -7]]'

     

  7. In the Colors tab, set the ColorOpacity to zero (all the way to the left). Go to the General tab and check the box next to Disable selections. Go to the Tooltip tab and select the "Off" option.

  8. Create a new variable called vCurrentClient with this as the definition:
    =TextBetween(OSUser(), '=', ';')​

     

That should be enough to get this working:
QC - 2064956 - Map image 1.gif

You could probably adapt this to use Section Access instead if you don't differentiate clients on the user directory values.

Austin Spivey | Principal Consultant @ Arc Analytics
ArcAnalytics.us | Add me on LinkedIn