Open cedarwells opened 2 years ago
can you provide a slightly more complete/representative sample of the common view spec you're trying to create from?
By way of example:TM1
Dim sMDX As String, sCVS As String, sUrl As String, sInstance As String
sUrl = "https://....." sInstance = "MyInstanceName"
sMDX = "SELECT [}ClientProperties].[}ClientProperties].MEMBERS DIMENSION PROPERTIES MEMBER_UNIQUE_NAME, MEMBER_NAME, MEMBER_CAPTION, LEVEL_NUMBER, CHILDREN_CARDINALITY ON 0, TM1SubsetToSet([}Clients].[}Clients], ""All Members"") DIMENSION PROPERTIES MEMBER_UNIQUE_NAME, MEMBER_NAME, MEMBER_CAPTION, LEVEL_NUMBER, CHILDREN_CARDINALITY ON 1 FROM [}ClientProperties]" sCVS = "{" & CHR(34) & "MDX" & CHR(34) & ":" & CHR(34) & sMDX & CHR(34) & "}"
' WORKS Call Reporting.Explorations.CreateFromMDX(sUrl, sInstance, sMDX)
' FAILS Call Reporting.Explorations.CreateFromCVS(sUrl, sInstance, sCVS, True)
ok, there's no meta portion in your CVS. could be we have a bug there. is there a support case?
I have tried the CVS with various alterations including the Meta object - with Meta as null or {} and also with Meta objects Aliases, ExpandAboves, ContextSets as {} or null. Perhaps you could advise what is expected. I had wondered if this required encoding?
it should be a string value of valid json, who's MDX string is valid mdx, and meta is a valid json object (if it exists).
it's possible to use the schema on the site https://ibm.github.io/paxapi/#common-view-specification-schema to validate the structural content of the CVS string value with regards to json notation (it won't validate the mdx, of course).
Running CreateFromCVS returns error - "the given key was not present in the dictionary". The JSON making up the CVS is formatted in {"MDX":"SELECT ...."} and is a string. Does the JSON need to be encoded? I have tried running different CVS JSON strings from different cubes - some using a Meta object, but they each return the same error. Note that I am able to run other PAX API commands without issue. I am running on 2.0.70.4.