Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ichimiike
Partner - Contributor III
Partner - Contributor III

Listing master items using .NET SDK

Hi there,

I have several apps, each of which contains 100+ master items which I'm now trying to document...

I COULD manually re-type / copy & paste the title and description of each one... but I'd rather not do that if possible.

SO... I've created a small app in C# which connects to the app and uses the AppExtensions.GetDimensionList method to do the hard work... and so far, it seems to be working great.

However, moving on to the other half of the issue... When I try the same for the Master Measures using AppExtensions.GetMeasureList, the titles are there, but the description seems to be missing... or at least hidden away somewhere.

Can anyone shed some light on on where I can find my missing info pls...

Cheers in advance,

Mat

1 Solution

Accepted Solutions
ichimiike
Partner - Contributor III
Partner - Contributor III
Author

So... I managed to get what I needed and figured I'd answer my own question in case someone else has the same problem.

The Master Measure description is saved as Meta Data...

Once you have the list of master measures (using AppExtensions.GetMeasureList(app)), you can loop through to get the relevant info for each one.  To get the meta data, use the below method:

          item.Meta.Get<type>(meta data name)

The below example uses a class I created called MasterItem which simply holds the Type (Dimension or Measure), Title and Description.

List<MasterItem> mItems = new List<MasterItem>();

var mList = AppExtensions.GetMeasureList(app);

foreach (var item in mList.Items)

{

    MasterItem m = new MasterItem();

    m.Type = "Measure";

    m.Title = item.Data.Title;

    m.Description = item.Meta.Get<string>("description");

    mItems.Add(m);

}


View solution in original post

3 Replies
ichimiike
Partner - Contributor III
Partner - Contributor III
Author

So... I managed to get what I needed and figured I'd answer my own question in case someone else has the same problem.

The Master Measure description is saved as Meta Data...

Once you have the list of master measures (using AppExtensions.GetMeasureList(app)), you can loop through to get the relevant info for each one.  To get the meta data, use the below method:

          item.Meta.Get<type>(meta data name)

The below example uses a class I created called MasterItem which simply holds the Type (Dimension or Measure), Title and Description.

List<MasterItem> mItems = new List<MasterItem>();

var mList = AppExtensions.GetMeasureList(app);

foreach (var item in mList.Items)

{

    MasterItem m = new MasterItem();

    m.Type = "Measure";

    m.Title = item.Data.Title;

    m.Description = item.Meta.Get<string>("description");

    mItems.Add(m);

}


sourabh808
Contributor II
Contributor II

Hello,

Can you please put the detailed information/ file regarding extraction of master dimensions/measure.

Thanks,

Sourabh

sourabh808
Contributor II
Contributor II

Hello,

Were you able to extract the expressions for each master dimension/ measure.