Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Highlighted
austingriff
New Contributor

How to use .NET SDK to check if an App is published while traversing apps

I am using the .NET SDK to traverse through all the apps in a Qlik Sense Enterprise account. I have been able to successfully traverse through all apps, but I am having difficulty checking if an app is published or not.

I believe the solution will be similar to getting the stream name of an app (seen here).

My base solution looks something like the following:
Screen Shot 2019-05-01 at 12.02.12 PM.png

My goal is to only traverse the app if it is published. I can see, using Visual Studio inspecting tools, that the data is there, I just need help extracting it.

Viewing the data in VS2017:

(1) Get the layout

Screen Shot 2019-05-01 at 12.04.16 PM.png

(2) Look at "Non-Public members" -> "State"

Screen Shot 2019-05-01 at 12.08.01 PM.png

(3) Expanding "State" you see:

Screen Shot 2019-05-01 at 11.51.05 AM.png

(4) Expanding "Structure" you get all the items which include "published: bool"

Screen Shot 2019-05-01 at 12.10.01 PM.png

My main question is: how do I use "AbstractureStructure" to get the "published" boolean from the app object?

1 Solution

Accepted Solutions
austingriff
New Contributor

Re: How to use .NET SDK to check if an App is published while traversing apps

It turns out to be pretty easy...

Screen Shot 2019-05-01 at 2.38.26 PM.png

For Copying:

using (var app = location.App(appIdentifier))

{

var appLayout = app.GetAppLayout();

Boolean isPublished = appLayout.Get<Boolean>("published");

}

1 Reply
austingriff
New Contributor

Re: How to use .NET SDK to check if an App is published while traversing apps

It turns out to be pretty easy...

Screen Shot 2019-05-01 at 2.38.26 PM.png

For Copying:

using (var app = location.App(appIdentifier))

{

var appLayout = app.GetAppLayout();

Boolean isPublished = appLayout.Get<Boolean>("published");

}