<?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 Re: Mashup query in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2116274#M91087</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Change below to:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;var app = qlik.openApp('APPID_HERE', config);
//max year -&amp;gt; do the same for month OR can use YearMonth &amp;amp; get a max out of it 

app.variable.getByName('MyVarName').then(function(model){

console.log(model,model.layout.qText); // this will give you the result capture it &amp;amp; then store it in variable

app.field("FieldName").selectValues([model.layout.qText], true, true);

},function(errorObject){ console.log(errorObject); } );&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 13 Sep 2023 03:03:37 GMT</pubDate>
    <dc:creator>ajaykakkar93</dc:creator>
    <dc:date>2023-09-13T03:03:37Z</dc:date>
    <item>
      <title>Mashup query</title>
      <link>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2115752#M91041</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;There is requirement to create mashup page from existing application with default max month and max year to be selected.&lt;/P&gt;
&lt;P&gt;In application, default showing all year and month data which should be keep as it is but while showing chart from this application into mashup page the always selected year and month to be max.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is it possible ? how?&lt;/P&gt;
&lt;P&gt;kindly suggest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 03:52:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2115752#M91041</guid>
      <dc:creator>Mahamed_Qlik</dc:creator>
      <dc:date>2023-09-12T03:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Mashup query</title>
      <link>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2115774#M91043</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You need to take certain steps to achieve this,&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Create a variable with max Month &amp;amp; year accordingly&lt;/LI&gt;
&lt;LI&gt;reload the application&lt;/LI&gt;
&lt;LI&gt;Visit Variable API &amp;amp; use&amp;nbsp; getByName method:&amp;nbsp;&lt;A title="Variable API" href="https://help.qlik.com/en-US/sense-developer/May2023/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/VariableAPI/getByName-variable-method.htm" target="_blank" rel="noopener"&gt;Variable API&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;Store the values in javascript variables&lt;/LI&gt;
&lt;LI&gt;Visit Field API &amp;amp;&amp;nbsp;use&amp;nbsp;&lt;SPAN&gt;selectValues&lt;/SPAN&gt;&amp;nbsp;method:&amp;nbsp;&amp;nbsp;&lt;A title="Field API" href="https://help.qlik.com/en-US/sense-developer/May2023/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/FieldAPI/selectValues-method.htm" target="_blank" rel="noopener"&gt;Field API&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;set the javascript variable with max Month &amp;amp; Year&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Follow the above steps &amp;amp; value will be selected by default while mashup HTML is loading&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 05:45:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2115774#M91043</guid>
      <dc:creator>ajaykakkar93</dc:creator>
      <dc:date>2023-09-12T05:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Mashup query</title>
      <link>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2115834#M91046</link>
      <description>&lt;P&gt;Hi Ajay,&lt;/P&gt;
&lt;P&gt;Thank you for your response. Here I have created and want to check if its correct as per your steps:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Create a variable with max Month &amp;amp; year accordingly - vMaxYear, vMaxMonth created in app and reloaded the app ( vMaxYear = Max(Year) &amp;amp; vMaxMonth = Max(Month) )&lt;/LI&gt;
&lt;LI&gt;reload the application - app reloaded and published&lt;/LI&gt;
&lt;LI&gt;Visit Variable API &amp;amp; use&amp;nbsp; getByName method: As below script&lt;/LI&gt;
&lt;LI&gt;Store the values in javascript variables :&amp;nbsp;As below script&lt;/LI&gt;
&lt;LI&gt;Visit Field API &amp;amp;&amp;nbsp;use&amp;nbsp;&lt;SPAN&gt;selectValues&lt;/SPAN&gt;&amp;nbsp;method:&amp;nbsp;&amp;nbsp;&lt;A title="Field API" href="https://help.qlik.com/en-US/sense-developer/May2023/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/FieldAPI/selectValues-method.htm?_ga=2.40246178.1292595021.1694429617-1234548020.1693732119" target="_blank" rel="noopener nofollow noreferrer"&gt;Field API :&amp;nbsp; As below script&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mahamed_Qlik_0-1694506302578.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116083i56CBCECE2D7657DA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Mahamed_Qlik_0-1694506302578.png" alt="Mahamed_Qlik_0-1694506302578.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2023 08:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2115834#M91046</guid>
      <dc:creator>Mahamed_Qlik</dc:creator>
      <dc:date>2023-09-12T08:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Mashup query</title>
      <link>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2116274#M91087</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Change below to:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;var app = qlik.openApp('APPID_HERE', config);
//max year -&amp;gt; do the same for month OR can use YearMonth &amp;amp; get a max out of it 

app.variable.getByName('MyVarName').then(function(model){

console.log(model,model.layout.qText); // this will give you the result capture it &amp;amp; then store it in variable

app.field("FieldName").selectValues([model.layout.qText], true, true);

},function(errorObject){ console.log(errorObject); } );&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 13 Sep 2023 03:03:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2116274#M91087</guid>
      <dc:creator>ajaykakkar93</dc:creator>
      <dc:date>2023-09-13T03:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Mashup query</title>
      <link>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2116282#M91088</link>
      <description>&lt;P&gt;Hi Ajay,&lt;/P&gt;
&lt;P&gt;This is how changed but still I am getting all the values in year filter:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mahamed_Qlik_0-1694576503578.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116169iB31286A8DFE27D32/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Mahamed_Qlik_0-1694576503578.png" alt="Mahamed_Qlik_0-1694576503578.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 03:41:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2116282#M91088</guid>
      <dc:creator>Mahamed_Qlik</dc:creator>
      <dc:date>2023-09-13T03:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: Mashup query</title>
      <link>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2116502#M91111</link>
      <description>&lt;P&gt;this means your select is failing - is year a number or string?&amp;nbsp; try using qNum instead of qText&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 13:01:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2116502#M91111</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2023-09-13T13:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Mashup query</title>
      <link>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2116744#M91121</link>
      <description>&lt;P&gt;Hi edwin,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is my final js code, I have changed qtext to qnum but no luck so far:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mahamed_Qlik_0-1694660685975.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/116254i62B4471F9E865BEB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Mahamed_Qlik_0-1694660685975.png" alt="Mahamed_Qlik_0-1694660685975.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 03:04:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2116744#M91121</guid>
      <dc:creator>Mahamed_Qlik</dc:creator>
      <dc:date>2023-09-14T03:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Mashup query</title>
      <link>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2116750#M91122</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please verify the below&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;Year&lt;/STRONG&gt; is a variable or its a field name, if it is a field name you need to add it in double quotes ("...")&lt;/LI&gt;
&lt;LI&gt;Check if statically providing the value of &lt;STRONG&gt;Year&lt;/STRONG&gt; let's say &lt;STRONG&gt;2023&lt;/STRONG&gt; if that selects for you&lt;BR /&gt;&lt;LI-CODE lang="javascript"&gt;app.field("Year").selectValues([2023], true, true);​

// OR try

app.field("Year").selectValues(["2023"], true, true);​&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Based on this you will understand if the value is in Num or Text &amp;amp; you choose the select value statement accordingly&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;BR /&gt;Final code:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;var app = qlik.openApp('dummyCal.qvf', config);

	//get objects -- inserted here --
	app.getObject('CurrentSelections','CurrentSelections');
	app.getObject('QV01','sbrRa');
	
	
	/*
//	alternate (not recomended)
app.createGenericObject( {
	vMaxYear: {
		qStringExpression: "=vMaxYear"
	},
	vMaxMonth : {
		qStringExpression: "=vMaxMonth"
	}
}, function ( reply ) {
	var month = reply.vMaxMonth,
		year = reply.vMaxYear;
	console.log(month,year);
	//app.field("Year").selectValues([year], true, true);
	app.field("Month").selectValues([{qText: month}], true, true);
});
	*/
/*
	app.variable.getByName('vMaxYear').then(function(model){
		console.log(model.qContent.qString); 
	});*/
	
	app.variable.getContent('vMaxYear').then(function(model){
		var a = parseInt(model.qContent.qString);
		console.log(model.qContent.qString,a); 
		app.field("Year").selectValues([a], true, true);
	});
	
	app.variable.getContent('vMaxMonth').then(function(model){
		console.log(model.qContent.qString); 
		app.field("Month").selectMatch("Dec", true);
	});
	
	&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 04:22:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2116750#M91122</guid>
      <dc:creator>ajaykakkar93</dc:creator>
      <dc:date>2023-09-14T04:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Mashup query</title>
      <link>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2117637#M91190</link>
      <description>&lt;P&gt;Hi Ajay,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks. This code works for me .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-javascript"&gt;&lt;CODE&gt;var a = parseInt(model.qContent.qString);
		console.log(model.qContent.qString,a); &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 17 Sep 2023 04:03:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2117637#M91190</guid>
      <dc:creator>Mahamed_Qlik</dc:creator>
      <dc:date>2023-09-17T04:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: Mashup query</title>
      <link>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2117672#M91191</link>
      <description>&lt;P&gt;Hello everyone, I often read your stuff and actively participate in this conversation. Check out this page as well.&amp;nbsp;&lt;A title="accessmcd&amp;nbsp;" href="https://accessmcd.info/" target="_blank" rel="noopener"&gt;accessmcd&amp;nbsp;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Sep 2023 18:11:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Mashup-query/m-p/2117672#M91191</guid>
      <dc:creator>emma22</dc:creator>
      <dc:date>2023-09-17T18:11:03Z</dc:date>
    </item>
  </channel>
</rss>

