<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Qlik Sense Mashup cannot load themes in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-cannot-load-themes/m-p/2465351#M20801</link>
    <description>&lt;DIV class="flex-shrink-0 flex flex-col relative items-end"&gt;
&lt;DIV&gt;
&lt;DIV class="pt-0.5 juice:pt-0"&gt;
&lt;DIV class="gizmo-bot-avatar flex h-6 w-6 items-center justify-center overflow-hidden rounded-full juice:h-8 juice:w-8"&gt;
&lt;DIV class="relative p-1 rounded-sm flex items-center justify-center bg-token-main-surface-primary text-token-text-primary h-8 w-8"&gt;&lt;SPAN&gt;Hello everyone,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="group/conversation-turn relative flex w-full min-w-0 flex-col agent-turn"&gt;
&lt;DIV class="flex-col gap-1 md:gap-3"&gt;
&lt;DIV class="flex flex-grow flex-col max-w-full"&gt;
&lt;DIV class="min-h-[20px] text-message flex flex-col items-start whitespace-pre-wrap break-words [.text-message+&amp;amp;]:mt-5 juice:w-full juice:items-end overflow-x-auto gap-2" dir="auto" data-message-author-role="assistant" data-message-id="573556ac-0bcd-4748-948b-99cdfb893677"&gt;
&lt;DIV class="flex w-full flex-col gap-1 juice:empty:hidden juice:first:pt-[3px]"&gt;
&lt;DIV class="markdown prose w-full break-words dark:prose-invert light"&gt;
&lt;P&gt;I recently created a Qlik Sense mashup. I encountered an issue loading the theme from the JS.&lt;/P&gt;
&lt;P&gt;Here is my code:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;require(["js/qlik"], function (qlik) {

///////// FETCH APP
var app1 = qlik.openApp('8ef91f26-c75a-4496-8903-aa0ca21ab424', config);

.....

var themeId = 'horizon';
qlik.theme.apply(themeId).then(function () {
console.log('Theme applied successfully:', themeId);
//Optional: Retrieve and log the applied theme
		app1.theme.getApplied().then(function (currentTheme) {
			console.log('Current applied theme:', currentTheme);
		}).catch(function (error) {
			console.error('Error getting applied theme:', error);
		});
	}).catch(function (error) {
		console.error('Error applying theme:', error);
	});
	
}&lt;/LI-CODE&gt;
&lt;P&gt;The objects in the Qlik Sense app already have the 'sense horizon' theme, however, the theme is not applied to the mashup.&lt;/P&gt;
&lt;P&gt;Any advice?&lt;BR /&gt;Thanks&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 25 Jun 2024 13:49:46 GMT</pubDate>
    <dc:creator>matteoCalderaro</dc:creator>
    <dc:date>2024-06-25T13:49:46Z</dc:date>
    <item>
      <title>Qlik Sense Mashup cannot load themes</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-cannot-load-themes/m-p/2465351#M20801</link>
      <description>&lt;DIV class="flex-shrink-0 flex flex-col relative items-end"&gt;
&lt;DIV&gt;
&lt;DIV class="pt-0.5 juice:pt-0"&gt;
&lt;DIV class="gizmo-bot-avatar flex h-6 w-6 items-center justify-center overflow-hidden rounded-full juice:h-8 juice:w-8"&gt;
&lt;DIV class="relative p-1 rounded-sm flex items-center justify-center bg-token-main-surface-primary text-token-text-primary h-8 w-8"&gt;&lt;SPAN&gt;Hello everyone,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="group/conversation-turn relative flex w-full min-w-0 flex-col agent-turn"&gt;
&lt;DIV class="flex-col gap-1 md:gap-3"&gt;
&lt;DIV class="flex flex-grow flex-col max-w-full"&gt;
&lt;DIV class="min-h-[20px] text-message flex flex-col items-start whitespace-pre-wrap break-words [.text-message+&amp;amp;]:mt-5 juice:w-full juice:items-end overflow-x-auto gap-2" dir="auto" data-message-author-role="assistant" data-message-id="573556ac-0bcd-4748-948b-99cdfb893677"&gt;
&lt;DIV class="flex w-full flex-col gap-1 juice:empty:hidden juice:first:pt-[3px]"&gt;
&lt;DIV class="markdown prose w-full break-words dark:prose-invert light"&gt;
&lt;P&gt;I recently created a Qlik Sense mashup. I encountered an issue loading the theme from the JS.&lt;/P&gt;
&lt;P&gt;Here is my code:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;require(["js/qlik"], function (qlik) {

///////// FETCH APP
var app1 = qlik.openApp('8ef91f26-c75a-4496-8903-aa0ca21ab424', config);

.....

var themeId = 'horizon';
qlik.theme.apply(themeId).then(function () {
console.log('Theme applied successfully:', themeId);
//Optional: Retrieve and log the applied theme
		app1.theme.getApplied().then(function (currentTheme) {
			console.log('Current applied theme:', currentTheme);
		}).catch(function (error) {
			console.error('Error getting applied theme:', error);
		});
	}).catch(function (error) {
		console.error('Error applying theme:', error);
	});
	
}&lt;/LI-CODE&gt;
&lt;P&gt;The objects in the Qlik Sense app already have the 'sense horizon' theme, however, the theme is not applied to the mashup.&lt;/P&gt;
&lt;P&gt;Any advice?&lt;BR /&gt;Thanks&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 Jun 2024 13:49:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-cannot-load-themes/m-p/2465351#M20801</guid>
      <dc:creator>matteoCalderaro</dc:creator>
      <dc:date>2024-06-25T13:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense Mashup cannot load themes</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-cannot-load-themes/m-p/2466425#M20822</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/288525"&gt;@matteoCalderaro&lt;/a&gt;&amp;nbsp; , you have to apply theme starting from &lt;A href="https://help.qlik.com/en-US/sense-developer/May2024/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/ThemeAPI/QTheme.htm" target="_self"&gt;QTheme&lt;/A&gt; object. You have to first get the theme, which is rertun a QTheme object, then use &lt;A href="https://help.qlik.com/en-US/sense-developer/May2024/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/ThemeAPI/QTheme-apply-method.htm" target="_self"&gt;apply&lt;/A&gt; method. Below an example:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;var themeId = "horizon";
qlik.getThemeList().then(function (themeList) {
	console.log("themeList: ", themeList);
	qlik.theme.get(themeId).then(function (theme) {
		theme.apply(theme).then(function () {
		console.log('Theme applied successfully:', themeId);
		//Optional: Retrieve and log the applied theme
				app.theme.getApplied().then(function (currentTheme) {
					console.log('Current applied theme:', currentTheme);
				}).catch(function (error) {
					console.error('Error getting applied theme:', error);
				});
		}).catch(function (error) {
			console.error('Error applying theme:', error);
		});
	});
});&lt;/LI-CODE&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/May2024/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/ThemeAPI/QTheme.htm" target="_self"&gt;https://help.qlik.com/en-US/sense-developer/May2024/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/ThemeAPI/QTheme.htm&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 13:48:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Qlik-Sense-Mashup-cannot-load-themes/m-p/2466425#M20822</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2024-06-28T13:48:42Z</dc:date>
    </item>
  </channel>
</rss>

