You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MDX2JSON/REST.cls.xml
+22-4Lines changed: 22 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -24,13 +24,19 @@ To get information about possible Cube's filters and filters' values:<br><ul>
24
24
<li>webapplication/FilterValues/:cube - to get all filters for DeepSee Cube in JSON format.</li>
25
25
<li>webapplication/FilterValues/:cube - Same but with POST { "Cube":"CubeName","Values":0} body. If values = 1, then filters' values would also be provided.</li>
26
26
<li>webapplication/FilterValues/:cube/:filter - to get all values for Filter for DeepSee Cube in JSON format.</li></ul>
27
-
Example: send HTTP GET request to web application with Dispatch class <b>MDX2JSON.REST</b> and URL:<br>
28
-
/FilterValues/HoleFoods/[DateOfSale].[Actual].[MonthSold] - to get information about possible values of [DateOfSale].[Actual].[MonthSold] in HoleFoods Cube.<br>
29
-
27
+
30
28
To get information about pivot:<br><ul>
31
29
<li>webapplication/DataSource- to get info about pivot (POST {DataSource:"Name of DS"})</li> </ul>
30
+
31
+
To get information about system-wide defaults (format):<br><ul>
32
+
<li>webapplication/Format - to get info about system-wide defaults (format). GET request </li> </ul>
33
+
32
34
You can add a param Namespace to request to execute MDX in desired namespace (MDX2JSON package must be mapped to that namespace):<br>
Example: send HTTP GET request to web application with Dispatch class <b>MDX2JSON.REST</b> and URL:<br>
38
+
/FilterValues/HoleFoods/[DateOfSale].[Actual].[MonthSold] - to get information about possible values of [DateOfSale].[Actual].[MonthSold] in HoleFoods Cube.<br>
Copy file name to clipboardExpand all lines: MDX2JSON/Utils.cls.xml
+30Lines changed: 30 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -219,5 +219,35 @@ Using dashboard name get JSON representation (array of ("type","title","mdx")) o
219
219
return st
220
220
]]></Implementation>
221
221
</Method>
222
+
223
+
<Methodname="GetFormat">
224
+
<Description>
225
+
Get format defaults.</Description>
226
+
<ClassMethod>1</ClassMethod>
227
+
<ReturnType>%Status</ReturnType>
228
+
<Implementation><![CDATA[
229
+
set st = $$$OK
230
+
set datelist="DD Mmm [YY]YY^MM/DD/[YY]^DD Mmm [YY]YY^YYYY-MM-DD^DD/MM/[YY]YY^Mmm D, YYYY^Mmm D YYYY^Mmm DD [YY]YY^YYYYMMDD^Mmmmmm D, YYYY^W^Www^Wwwwww^[D]D/[M]M/YYYY^nnn"
231
+
set timelist="hh:mm:ss,hh:mm,hh:mm:ss[AM/PM],hh:mm[AM/PM]" // lists taken from %CSP.UI.Portal.NLSEdit - DrawProperties
232
+
set proplist = "AM,DateSeparator,DecimalSeparator,MinusSign,MonthAbbr,MonthName,NumericGroupSeparator,NumericGroupSize,PM,PlusSign,TimePrecision,TimeSeparator,WeekdayAbbr,WeekdayName"
233
+
set obj = ##class(%ZEN.proxyObject).%New()
234
+
235
+
try {
236
+
for i = 1:1:$L(proplist, ",") {
237
+
set property = $P(proplist, ",", i)
238
+
do obj.%DispatchSetProperty(property,##class(%SYS.NLS.Format).GetFormatItem(property))
239
+
}
240
+
241
+
// that's why we cant just do ##class(%ZEN.Auxiliary.jsonProvider).%ObjectToJSON()
242
+
set obj.DateFormat = $P(datelist, "^",##class(%SYS.NLS.Format).GetFormatItem("DateFormat"))
243
+
set obj.TimeFormat = $P(timelist, ",",##class(%SYS.NLS.Format).GetFormatItem("TimeFormat"))
0 commit comments