Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, dear Qlikers!
I am using the latest version of the QlikSense SDK and I am trying to get rid of the obsolete function
App.GetMeasureList.Items
I am trying something like the snippet bellow, but for sure it is fundamentally broken as something is escaping me related to how to attach to the transient object the qMeasureListDef.
My question is: where should one bind the MeasureListDef in the transient object's properties in such a way that when I call its GetLayout() to be able to output the list of measures in the given app?
What I have so far:
Dim measlist As MeasureListDef = New MeasureListDef With {.Type = "measure"} Dim transient_obj = app.CreateGenericSessionObject(prop:=New GenericObjectProperties With {.Info = New NxInfo With {.Id = "ML01", .Type = "MeasureList"}, .MetaDef = CType(measlist, NxMetaDef) }) Dim mes = transient_obj.GetLayout
OK, it seems that I found the solution. So I will leave it here for anyone looking for the same thing in the future.
Cheers, guys!
Dim props As GenericObjectProperties = New GenericObjectProperties With {.Info = New NxInfo With {.Id = "ML01", .Type = "MeasureList"}}
props.Set("qMeasureListDef", New MeasureListDef With {.Type = "measure"})
Dim mes = qsApp.CreateGenericSessionObject(prop:=props).GetLayout().Get(Of MeasureObjectViewList)("qMeasureList")
For Each m In mes.Items
Log.Information(m.Info.Id & " - " & qsApp.GetMeasure(m.Info.Id).NxLibraryMeasure.Def)
Next
OK, it seems that I found the solution. So I will leave it here for anyone looking for the same thing in the future.
Cheers, guys!
Dim props As GenericObjectProperties = New GenericObjectProperties With {.Info = New NxInfo With {.Id = "ML01", .Type = "MeasureList"}}
props.Set("qMeasureListDef", New MeasureListDef With {.Type = "measure"})
Dim mes = qsApp.CreateGenericSessionObject(prop:=props).GetLayout().Get(Of MeasureObjectViewList)("qMeasureList")
For Each m In mes.Items
Log.Information(m.Info.Id & " - " & qsApp.GetMeasure(m.Info.Id).NxLibraryMeasure.Def)
Next