Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
austingriff
Contributor
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?

Labels (5)
1 Solution

Accepted Solutions
austingriff
Contributor
Contributor
Author

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");

}

View solution in original post

1 Reply
austingriff
Contributor
Contributor
Author

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");

}