go to post Jolyon Smith · Jul 16, 2024 Have you had a look at %RoutineIndex::RebuildIndex? The documentation suggests this does what you want: https://docs.intersystems.com/irisforhealthlatest/csp/documatic/%25CSP.D.... It should be available in the version of Ensemble you're running.
go to post Jolyon Smith · Jun 6, 2023 You can also set this at a workspace or user level by going into Settings -> Extensions -> InterSystems ObjectScript and updating the "ObjectScript Compile Flags" setting:
go to post Jolyon Smith · Mar 20, 2023 This seems like something that would be better managed using an existing source control system such as Git, Perforce, or Deltanji.
go to post Jolyon Smith · Oct 20, 2022 You don't need to change the "%" to a "_" in this instance as the cls method is being passed a string literal. This works fine: print(iris.cls('%SYSTEM.OBJ').Version()) InterSystems IRIS Version 2022.1.0.209
go to post Jolyon Smith · Oct 6, 2022 There's a method on the iris.gref class called "data". set ^zJES(1)="$data = 1" set ^zJES(2,0)="$data = 10" set ^zJES(4) = "" set ^zJES(4,0) = "" The result ends up matching $data: >>> glb = iris.gref("^zJES") >>> print(glb.data()) 10 >>> print(glb.data([1])) 1 >>> print(glb.data([2])) 10 >>> print(glb.data([3])) 0 >>> print(glb.data([4])) 11 I found running help(iris) at the Python shell helpful for working this kind of stuff out. Edit: Unlike @Robert Cemper's solution this does not return the value of the node we're testing (like the 2 parameter usage $data)
go to post Jolyon Smith · Jul 13, 2022 It's probably worth mentioning that this was always the limit. Prior to IRIS 2020.1 (from memory) any characters after the first 31 were just ignored, so in the above example the global would be truncated to ^Jobcosting.JobActivityGroupGrou. There is now a hard stop in the class compiler that prevents global names longer than the limit as there was the potential for truncated global names to clash.
go to post Jolyon Smith · Jun 21, 2022 One option is $select: set a=$select(a>b:1,1:0) You could could also put the if..else on a single line: if (a<b) { set a=1 } else { set a=0 } This would also achieve the same result, but is a bit more limited: set a=(a>b)
go to post Jolyon Smith · Jun 7, 2022 I've found that going to Help -> Toggle Developer Tools can be a useful way to identify connection issues with HTTPS. VSCode is built on Chromium, so you have access to the same debug console.
go to post Jolyon Smith · Dec 4, 2018 In Studio if you go to "Options"-> "Editor" -> "Keyword Expansion", you can change whether it uses uppercase, lower case, mixed case or retains the original case when you CTRL+E
go to post Jolyon Smith · Sep 14, 2018 A couple of small pieces of feedback: %Close() doesn't do anything. You can call result.Close(), but if your intention is to destroy the object, you should just kill it.Using $get(result.Data("Name")) will be quicker than using GetDataByName.
go to post Jolyon Smith · Sep 7, 2018 I know I may be a bit late to the party here, but would the NotInheritable method keyword do what you're after? https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
go to post Jolyon Smith · Mar 14, 2018 You can also try overriding the GUIDENABLED parameter from %Persistent: Class User.Test1 Extends %Persistent { Parameter GUIDENABLED = 1; Property Property1 as %String; Storage Default { <Data name="Test1DefaultData"> <Value name="1"> <Value>%%CLASSNAME</Value> </Value> <Value name="2"> <Value>Property1</Value> </Value> </Data> <DataLocation>^User.Test1D</DataLocation> <DefaultData>Test1DefaultData</DefaultData> <IdLocation>^User.Test1D</IdLocation> <IndexLocation>^User.Test1I</IndexLocation> <StreamLocation>^User.Test1S</StreamLocation> <Type>%Library.CacheStorage</Type> } } Will give you: USER>set obj = ##class(Test1).%New() USER>set obj.Property1 = "Hello" USER>w obj.%Save() 1 USER>w obj."%%GUID" FC381F94-277E-11E8-82F0-005056B479AA The ^OBJ.GUID index that this creates can be accessed via %ExtentMgr.GUID.
go to post Jolyon Smith · Sep 20, 2016 You could improve that further by using the 3 parameter version of $order to fetch "Data". i.e:Set Sub3=$Order(^Trans(Sub1,Sub2,Sub3))If Sub3="" QuitWrite ?6,Sub3," = "Set Data=(^Trans(Sub1,Sub2,Sub3))Write Data,!Becomes:Set Sub3=$Order(^Trans(Sub1,Sub2,Sub3),1,Data)If Sub3="" QuitWrite ?6,Sub3," = ",DataWrite Data,!
go to post Jolyon Smith · Jul 19, 2016 It might be worth mentioning that you can insert a line directly after the last offset that's been zprinted by simply hitting <tab> , entering the line(s) and zsaving.