Qlik Community

Ask a Question

Integration, Extension & APIs

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

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
pamaxeed
Partner
Partner

Masteritem Creation API SDK .net

Hi!
I have a question regarding the generation of MasterItems via .NET. I have developed a little Console App which is taken as input an .xlsx file and generates accordingly to the definition the MasterItems, which means Dimensions and Measures. All is working fine, just the Label Expression are not created successfully.
Please take in a look to my code and especially the part of code related to the FieldLabels which is not taken in account during the creation of the MasterDimension.
Is there any mistake or I miss something?

public void CreateMasterDimension(string id, string metaTitleDef, string metaDescriptionDef, string fieldDef, string fieldDefLabel)
{
IDimension myDimension = QsIApp.CreateDimension(id,
new DimensionProperties
{
MetaDef = new MetaAttributesDef
{
Title = metaTitleDef,
Description = metaDescriptionDef
},
Dim = new NxLibraryDimensionDef
{
FieldDefs = new[] { fieldDef },
FieldLabels = new[] { "Dummy" }
}
});

QsIApp.DoSave();
QSReadMasterItems();
}
Labels (3)
1 Reply
yko
Employee
Employee

I think you need to define the property "qLabelExpression" as well. I can recommend using the tool Qlik Explorer for Developers when you want to investigate what the properties and layout structures used by Qlik Sense looks like. Here is an example screenshot of the properties for a master dimension I created:

MasterDimension.png