Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Nikhil_Goyal_Qlik
Contributor II
Contributor II

How to get Appid for other App from current App

Is there any way to dynamically capture the App id for another app from current app.

DocumentName() function is used to get the App id of current app.

 

Ex: In App A, I want to get the AppID of App B.

Labels (1)
6 Replies
Levi_Turner
Employee
Employee

What information do you have about App B? The Name? Are we sure that the name will not have duplicates?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

In what environment do you  want to do this?  Chart expression, Script, Extension?

-Rob

Nikhil_Goyal_Qlik
Contributor II
Contributor II
Author

Yes, we are sure that app name won't be duplicated. We have only unique App names.

 

Is there any way to get the AppID based on AppName ?

Nikhil_Goyal_Qlik
Contributor II
Contributor II
Author

I want to create a dynamic URL which will be used in Vizlib straight table dimension value to create hyperlink for the detailed report(App) by passing filters in URL.

Levi_Turner
Employee
Employee

Here's an example. I am piggy backing off of the X connection which should work so long as the License and Operations Monitor apps can successfully reload. If reloading this in the Hub, ensure that you can see this data connection.

Let vDataConnection = 'monitor_apps_REST_app';

LIB CONNECT TO '$(vDataConnection)';

RestConnectorMasterTable:
SQL SELECT 
	"id" AS "id_u3",
	"name" AS "name_u2",
	"__KEY_root"
FROM JSON (wrap on) "root" PK "__KEY_root"
WITH CONNECTION(
	URL "https://localhost/qrs/app/full?filter=(name eq 'Operations Monitor')",
	HTTPHEADER "X-Qlik-xrfkey" "12345678qwertyui",
	QUERY "xrfkey" "12345678qwertyui"
);

[app]:
LOAD	[id_u3] AS [appid],
	[name_u2] AS [appname],
	[__KEY_root]
RESIDENT RestConnectorMasterTable
WHERE NOT IsNull([__KEY_root]);

Drop Field __KEY_root;
DROP TABLE RestConnectorMasterTable;
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If you have QS Document Analyzer 1.7 connector installed, you can use the connector like this to get a list of Apps in the script.

LIB CONNECT TO 'appmeta';  // or your connection name
SQL SELECT
  AppId,
  AppName,
  AppIdentifier_Error,
  AppTitle
FROM AppIdentifier;

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com