go to post Ben Spead · Jun 25 If you know that it begins and ends with CRLF then it is as simple as: USER>Set string = "[line feed](carriage return) str [line feed](carriage return) ing [line feed](carriage return)" USER>Write $piece(string,"[line feed](carriage return)",2,*-1) str [line feed](carriage return) ing
go to post Ben Spead · Jun 24 Could you please describe the situations where it does something "bad" or where you see things as not working correctly?
go to post Ben Spead · Jun 19 We use nightly IRIS backups which are moved to a network share, so Test can restore the backups to an alternate application data DB via a script. We always have 2 application DBs defined, so we can script a restore on a weekly basis so the data is readily available if a developer needs it - they simply swap from the active data DB to the alternate (the alternate is always the target of the automated restore so as not to interrupt any data depending testing which may be actively going on at the time of restore). We have found this to be very effective for our needs for multiple internal applications.
go to post Ben Spead · Jun 17 I recommend reaching out to the WRC to help you dig into this specific error.
go to post Ben Spead · Jun 13 Voted! Nice write-up, thank you Jean. (boy .. the MS community pages don't work nearly as well as the InterSystems D.C.!) Have you considered posting your content above in the appropriate MS Discussion Forum for PowerBI in order to drum up some more support? It is very well articulated :)
go to post Ben Spead · Jun 13 Great work Developer Relations Team!! It was a great conference and it was wonderful to see so many people connecting on so many different levels. The culture is contagious :) We all appreciate your hard work!
go to post Ben Spead · Jun 13 if you are wanting to completely render the page within the context of another page, then using <iframe src="package.page.csp" </iframe> is going to be your best bet. Remember that a csp page isn't just a static HTML snippet - it is an entire renderable page, along with pre-page headers, etc. That is why OnPreHttp(), OnBody() and OnPostHttp() are all included in the page framework for a .csp. If you simply want to show what is 'rendered' when you call the page directly, you can play with calling OnPage() (which contains the compiled version of the entire body of your .csp file), but that may not operate correctly when called in isolation - it is intended to be called as part of a full pageload process, which the iframe approach above would provide.
go to post Ben Spead · Jun 13 just like you would call any class - "write ##class(csp.package.page).method()"
go to post Ben Spead · Jun 13 It's been a while since I had to look these up. You probably have to select the option for 'show generated code' order to find it. Unless you overwrote the default package, they should show up as csp.****.cls classes (in the "csp" package)
go to post Ben Spead · Jun 13 the .csp file compiles into a subclass of type %CSP.Page. When it is called, on the back end the various methods of the subclass of %CSP.Page are involved in order to stream the content of the .csp page. Please see the documentation link above for more details.
go to post Ben Spead · Jun 13 Actually, you should read this doc: https://docs.intersystems.com/iris20241/csp/docbook/Doc.View.cls?KEY=GCS... there are other callbacks you will need to call besides OnBody(). Make sure to call them in succession to get full page functionality.
go to post Ben Spead · Jun 13 look at the generated class from the csp. you should be able to call the OnBody() method to create the text stream containing the html
go to post Ben Spead · Jun 13 a CSP page will actually compile into a .cls, so you can call specific methods of your CSP page by calling the method using ##class(mycsppackage.mycsppage).methodname() (the csp package name is configurable but defaults to 'csp')
go to post Ben Spead · May 30 thank you @Eduard Lebedyuk ... this is an interesting approach. Unfortunately, a couple of the globals I need to override for Bar are top level %ALL mappings, but others are subscripts so I may be able to cut down my custom coding using this approach.
go to post Ben Spead · Apr 26 it sounds like this is an Epic provided example, so presumably ConvertToMTime is defined by Epic but was either misspelled or called from a context where it couldn't be found
go to post Ben Spead · Apr 25 I want to re-iterate what Evgeny said ... you should never store your persistent objectscript class definition in source control without the storage definition block. Doing so will cause the storage block to be regenerated from scratch each time source is loaded, and if there is existing data you may have a mismatch of where properties exist on disk and where where the source thinks they should live