<?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: How to filter by sheet show condition in js? in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2422630#M19986</link>
    <description>&lt;P&gt;For the example with Capability API it works, however there are 100+ apps that I need to check for their sheet conditions.&lt;/P&gt;
&lt;P&gt;I'm looping all app ids and calling something like this:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;apps.forEach((app) =&amp;gt; {
  var _app = qliks.openApp(app.id, config);

  _app.getList("sheet", function (reply) {
    reply.qAppObjectList.qItems.forEach(function (sheet) {
      if (sheet.qData.showCondition == "0") return;
    });
  });
});&lt;/LI-CODE&gt;
&lt;P&gt;It feels wrong and also I get websocket error insufficient resources&lt;/P&gt;
&lt;P&gt;How to best handle this?&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2024 22:33:59 GMT</pubDate>
    <dc:creator>AKN</dc:creator>
    <dc:date>2024-02-22T22:33:59Z</dc:date>
    <item>
      <title>How to filter by sheet show condition in js?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2159109#M19687</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="resim.png" style="width: 285px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/126645i1B18B06D8AAA0F73/image-size/large?v=v2&amp;amp;px=999" role="button" title="resim.png" alt="resim.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As you can see I'm hiding the sheet setting show condition to 0.&lt;/P&gt;
&lt;P&gt;Using this I can get the sheets but this returns all of them.&lt;/P&gt;
&lt;P&gt;'/qrs/app/object/full?xrfKey=' + xrfKey + '&amp;amp;filter=(objectType eq "sheet")'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I filter out the sheets that are hidden?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 12:10:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2159109#M19687</guid>
      <dc:creator>AKN</dc:creator>
      <dc:date>2024-01-08T12:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter by sheet show condition in js?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2159615#M19692</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/260821"&gt;@AKN&lt;/a&gt;&lt;/SPAN&gt; , this info seems not be exposed in QRS API. For getting this info you have to use Engine API.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 13:45:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2159615#M19692</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2024-01-09T13:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter by sheet show condition in js?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2163595#M19738</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145804"&gt;@alex_colombo&lt;/a&gt;&amp;nbsp;, thanks.&lt;/P&gt;
&lt;P&gt;How would I get this info using Engine API exactly? Couldn't seem to find out.&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jan 2024 13:37:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2163595#M19738</guid>
      <dc:creator>AKN</dc:creator>
      <dc:date>2024-01-21T13:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter by sheet show condition in js?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2163707#M19740</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/260821"&gt;@AKN&lt;/a&gt;&amp;nbsp;, this is how you can do this using Capability APIs (it is a wrapper on top of Engine APIs).&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;qlikApp.getAppObjectList("sheet", function (data) {   
    data.qAppObjectList.qItems.forEach(async function (value) {
    //Evaluate sheet condition if present
    let sheetConditionValue = true
    if(value.qData.showCondition) {
        //Create generic object for evaluating the sheet condition
        const sheetCondition = await qlikApp.createGenericObject({condition: { qValueExpression: value.qData.showCondition} });
        //Getting result of sheet condition
        const sheetConditionResult = await sheetCondition.getLayout();
        sheetConditionValue = sheetConditionResult.condition
    }
    })
})&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And this is how to do it with Engine APIs.&lt;/P&gt;
&lt;P&gt;Create session object for having sheet list&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
		"name": "SHEETLIST",
		"method": "CreateSessionObject",
		"handle": "${dochandle}",
		"params": [
			{
				"qInfo": {
					"qType": "SheetList"
				},
				"qAppObjectListDef": {
					"qType": "sheet",
					"qData": {
						"title": "/qMetaDef/title",
						"description": "/qMetaDef/description",
						"thumbnail": "/thumbnail",
						"cells": "/cells",
						"rank": "/rank",
						"columns": "/columns",
						"rows": "/rows"
					}
				}
			}
		]
	}&lt;/LI-CODE&gt;
&lt;P&gt;From returing object, I'm calling GetLayout for reading sheet list&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
	"method": "GetLayout",
	"handle": 2,
	"params": [],
	"outKey": -1,
	"id": 4
}&lt;/LI-CODE&gt;
&lt;P&gt;Then you have to loop over response and read sheets. I'm getting as example the first sheet using GetObject method&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
	"handle": 1,
	"method": "GetObject",
	"params": {
		"qId": "67375059-2b6f-4f0f-bd5c-16e85b0b926f"
	}
}&lt;/LI-CODE&gt;
&lt;P&gt;I'm performing a GetLayout method on sheet object for reading the show condition. Below a response example, you can find showCondition property at the end of this json object.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
	"jsonrpc": "2.0",
	"id": 6,
	"delta": true,
	"result": {
		"qLayout": {
			"qInfo": {
				"qId": "67375059-2b6f-4f0f-bd5c-16e85b0b926f",
				"qType": "sheet"
			},
			"qMeta": {
				"title": "My new sheet",
				"description": "",
				"privileges": [
					"read",
					"update",
					"delete",
					"exportdata",
					"approve"
				]
			},
			"qSelectionInfo": {},
			"rank": -1,
			"thumbnail": {
				"qStaticContentUrl": {}
			},
			"columns": 24,
			"rows": 12,
			"cells": [],
			"qChildList": {
				"qItems": []
			},
			"gridResolution": "small",
			"showCondition": "1=0"
		}
	}
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Then, I'll create a new session object for evaluating the show condition on Engine side.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "delta": true,
    "handle": 1,
    "method": "CreateSessionObject",
    "params": [
        {
            "condition": {
                "qValueExpression": "1=0"
            },
            "qInfo": {
                "qType": "mashup",
            }
        }
    ],
    "id": 9,
    "jsonrpc": "2.0"
}&lt;/LI-CODE&gt;
&lt;P&gt;As last step, perform GetLayout for reading showCondition result. Below and example of response, you can find the resul in &lt;EM&gt;condition&lt;/EM&gt; property (0 is false, -1 is true)&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "jsonrpc": "2.0",
    "id": 10,
    "delta": true,
    "result": {
        "qLayout": [
            {
                "op": "add",
                "path": "/",
                "value": {
                    "qInfo": {
                        "qId": "MUfDdDH",
                        "qType": "mashup"
                    },
                    "qMeta": {
                        "privileges": [
                            "read",
                            "update",
                            "delete",
                            "exportdata"
                        ]
                    },
                    "qSelectionInfo": {},
                    "condition": 0
                }
            }
        ]
    }
}&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 22 Jan 2024 08:27:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2163707#M19740</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2024-01-22T08:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter by sheet show condition in js?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2163712#M19741</link>
      <description>&lt;P&gt;There's a "showCondition" property in the Properties of the the sheet. The Layout will contain the evaluated version:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HiddenSheet.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/127488iAD4371533B06883D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="HiddenSheet.png" alt="HiddenSheet.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 08:32:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2163712#M19741</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2024-01-22T08:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter by sheet show condition in js?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2163717#M19742</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/41242"&gt;@Øystein_Kolsrud&lt;/a&gt;&amp;nbsp;, using Engine API Explorer, if I use GetObject on a sheet and then GetLayout I received the expression, and not the evaluation. I expected to see the result from GetLayout, but it doesn't, that's why I suggest to create a session object for evaluating the expression.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 08:44:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2163717#M19742</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2024-01-22T08:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter by sheet show condition in js?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2163740#M19746</link>
      <description>&lt;P&gt;Hmm... That's odd. The layout should contain the evaluated form.&lt;/P&gt;
&lt;P&gt;Anyway, if you create an AppObjectList like you do in your example, then you can also add the show condition directly in the "qData" section. Something like this:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;"qData": {
  "title": "/qMetaDef/title",
  ...
  "rows": "/rows",
  "showCondition": "/showCondition"
}&lt;/LI-CODE&gt;
&lt;P&gt;Then you'll find the evaluated version of the "showCondition" expression directly in the "qItems" list when you get the layout of you app object list. That way you don't have to open all the sheets to get the evaluated version.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 09:10:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2163740#M19746</guid>
      <dc:creator>Øystein_Kolsrud</dc:creator>
      <dc:date>2024-01-22T09:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter by sheet show condition in js?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2422630#M19986</link>
      <description>&lt;P&gt;For the example with Capability API it works, however there are 100+ apps that I need to check for their sheet conditions.&lt;/P&gt;
&lt;P&gt;I'm looping all app ids and calling something like this:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;apps.forEach((app) =&amp;gt; {
  var _app = qliks.openApp(app.id, config);

  _app.getList("sheet", function (reply) {
    reply.qAppObjectList.qItems.forEach(function (sheet) {
      if (sheet.qData.showCondition == "0") return;
    });
  });
});&lt;/LI-CODE&gt;
&lt;P&gt;It feels wrong and also I get websocket error insufficient resources&lt;/P&gt;
&lt;P&gt;How to best handle this?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 22:33:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2422630#M19986</guid>
      <dc:creator>AKN</dc:creator>
      <dc:date>2024-02-22T22:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter by sheet show condition in js?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2422777#M19990</link>
      <description>&lt;P&gt;Can you descrive your requirement? Why do you need to get sheet conditions from 100+ apps? Are you closing the websocket as soon as you have the sheet conditions?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 08:50:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2422777#M19990</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2024-02-23T08:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter by sheet show condition in js?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2422809#M19993</link>
      <description>&lt;P&gt;I'm making a sidebar that contains all streams&amp;gt;apps&amp;gt;sheets as dropdown menu. If a sheet has show condition 0 then I don't want to show it there.&lt;/P&gt;
&lt;P&gt;I can get all the sheets using qrs/app/object/full?xrfKey=xxx&amp;amp;filter=(objectType eq 'sheet')&lt;/P&gt;
&lt;P&gt;but I can't filter show condition this way.&lt;/P&gt;
&lt;P&gt;So what I'm doing is when I get the apps using qrs/app/full?xrfKey=xxx&amp;amp;filter=(stream ne null) I loop through all apps and open them. Then return if show condition is 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can't think of any other way to do this so if you have an idea please tell me.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 09:29:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2422809#M19993</guid>
      <dc:creator>AKN</dc:creator>
      <dc:date>2024-02-23T09:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter by sheet show condition in js?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2422929#M19998</link>
      <description>&lt;P&gt;As mentioned, are you closing the websocket as soon as you have the sheet condition?&lt;/P&gt;
&lt;P&gt;An idea could be to just show the streams and the apps, then when a user select the apps, you will open the app and get the sheets list, instead of getting all the sheets from all the apps. Could this work?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 13:23:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2422929#M19998</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2024-02-23T13:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter by sheet show condition in js?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2422935#M19999</link>
      <description>&lt;P&gt;No I'm not closing the websocket because I'm not sure how to do that...&lt;/P&gt;
&lt;P&gt;And yeah that's what I'm doing right now! However, there is a searchbar and it searches through all streams apps and sheets. When user searches for a sheet, it doesn't show up since sheets are not loaded yet.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 13:29:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2422935#M19999</guid>
      <dc:creator>AKN</dc:creator>
      <dc:date>2024-02-23T13:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter by sheet show condition in js?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2422937#M20000</link>
      <description>&lt;P&gt;Try closing the web socket in &lt;A href="https://help.qlik.com/en-US/sense-developer/November2023/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/AppAPI/close-method.htm" target="_self"&gt;this&lt;/A&gt; way and let me know if this solve the issue.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 13:34:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2422937#M20000</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2024-02-23T13:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter by sheet show condition in js?</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2422945#M20001</link>
      <description>&lt;P&gt;Oh, this. Yes I've tried it before. It works for like half of the apps and then gives error, cannot connect to the server.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2024 13:45:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/How-to-filter-by-sheet-show-condition-in-js/m-p/2422945#M20001</guid>
      <dc:creator>AKN</dc:creator>
      <dc:date>2024-02-23T13:45:59Z</dc:date>
    </item>
  </channel>
</rss>

