I managed to make it work. The problem was related to the generated javascript file during compile time that has been saved as ANSI. I just changed the encoding to UTF-8 through Notepad->Save As and it worked fine.
- Log in to post comments
I managed to make it work. The problem was related to the generated javascript file during compile time that has been saved as ANSI. I just changed the encoding to UTF-8 through Notepad->Save As and it worked fine.
Hi Simon,
I don´t know wich version of Caché or Ensemble you are running but it is available with DeepSee´s feature for predictive analyses that works with a decision tree PMML file created from a external tool. Let me know if you want additional details.
Regards.
Thank you Stefan!
Hi Daniel!
Thank you for you help. I got your explanation but my question may be very poor about what I was expecting.
Considering the same classes that you mentioned above, from SAMPLES (Sample.Company and Sample. Employee) I ran the following code:
USER>zn "samples"
SAMPLES>set c = ##class(Sample.Company).%OpenId(1)
SAMPLES>w c
1@Sample.Company
SAMPLES>w c.Name
PicoPlex Gmbh.
SAMPLES>w c.Employees
2@%Library.RelationshipObject
SAMPLES>w c.Employees.Count()
5
SAMPLES>w c.Employees.GetAt(1)
3@Sample.Employee
SAMPLES>w c.Employees.GetAt(1).Name
Thompson,Vincent L.
SAMPLES>w c.Employees.GetAt(2).Name
Garcia,Amanda C.
SAMPLES>w c.Employees.GetAt(3).Name
Noodleman,Barbara T.
SAMPLES>w c.Employees.GetAt(4).Name
Smith,Dick A.
SAMPLES>
From the result above you can notice that the employee names, for instance, is not ordered. My question was about choose the order by name, salary or any other property value from the "child class". Is it possible? What would be an alternative for that?
PS: I also have tried to use SetObjectAt method and pass a key parameter value with the value that I want to be ordered. However when I try to retrieve data by using thoses key values, it does not work according to the key order that I tried to use on SetObjectAt key parameter value.
Thanks.
Excellent article!
OK. I am going to wait for the next release.
Thanks.
Nice.
Thank you.
I have downloaded and installed Cache version is Cache for Windows (x86-64) 2016.2 (Build 613U) Wed Mar 9 2016 19:14:35 EST and Atelier 1.0.116 and it still not working for me.
I also have tried with the cloud caché Cache for UNIX (Red Hat Enterprise Linux for x86-64) 2016.2 (Build 605U) Thu Feb 25 2016 19:24:57 EST and is not working as well.
I have tested with Atelier 1.0.122 (unreleased) and it worked.
Thank you very much.
Worked well.
Please, attach your code that generates this output.
Are you using some provider?
I thought about stash the header and footer and inject this code on the layouts when needed . Also they would likje to control the active option, for instance, or have a history bar right bellow the menu.
I am really interested in advice to them the best approach and I am worried about do not make simple things became a monster in order to get difficult for maintanance, etc.
Hi Steffan,
I though about have those header and footer layouts stashed and or loaded dinamically so that it can be injected the other pages/layouts when needed.
Could you please provide me more details about how to have this menu logic in a central method, as you mentioned? I have adviced them to use Multiple Templates (Dynamic Dispatch) in order to have the code more organized and easy to maintain.
Thanks.
Hi Jue,
I am trying to install AngularJS from http://oss.opensagres.fr/angularjs-eclipse/1.1.0/. I don´t really know if this is the right one if it suits on our Atleier version. However I have searched for some Angular JS pluging on Google and followed the instructions. I am trying to install from Atelier->Help->Install New
This is the error that I am facing out:



It takes a while longer trying to compute 15 alternative solutions by itself and then pops up the error message above.
Thanks.
Not necessary. It was just a copy and paste. You can use a registered for this and just expose your classmethod as sqlproc.
Sharing with all another example.
Credits to Amir Samary.
Class Sequence.Implementation Extends %RegisteredObject
{
/// SQL Example:
/// select Sequence.NextVal('TEST')
ClassMethod NextVal(pSeqName As %String, pContext As %String = "*") As %Integer [ SqlName = NextVal, SqlProc ]
{
set tSeqName = $ZConvert(pSeqName,"U")
Set tContext = $ZConvert($Select(pContext'="":pContext,1:"*"),"U")
Set seq = ""
if $Data(^Sequence(tSeqName))
{
set seq = $Increment(^Sequence(tSeqName,tContext))
Set %Sequence(tSeqName,tContext)=seq //For use by CurrVal()
}
else
{
throw ##class(%Exception.SQL).CreateFromSQLCODE("-460","Sequence does not exist")
}
Quit seq
}
/// SQL Example:
/// select Sequence.CurrVal('TEST')
/// WARNING: This will not work when called on the Management Portal since different processes
/// on the CSP Gateway pool may be answering to the HTTP request to execute the query.
/// This should work properly vía ODBC/JDBC since a single process is kept open for us and should
/// also work on $System.SQL.Shell().
ClassMethod CurrVal(pSeqName As %String, pContext As %String = "*") As %Integer [ SqlName = CurrVal, SqlProc ]
{
set tSeqName = $ZConvert(pSeqName,"U")
Set tContext = $ZConvert($Select(pContext'="":pContext,1:"*"),"U")
Set seq = ""
if $Data(%Sequence(tSeqName,tContext))
{
set seq = %Sequence(tSeqName,tContext)
}
else
{
throw ##class(%Exception.SQL).CreateFromSQLCODE("-460","There is no current value for this sequence. Call NextVal() first.")
}
Quit seq
}
/// Create a new Sequence if it not exist. If the sequence exist, then return an error message
/// Ejemplo de SQL:
/// select Sequence.CreateSequence('TEST')
ClassMethod CreateSequence(pSeqName As %String, pContext As %String = "*") As %String [ SqlName = CreateSequence, SqlProc ]
{
set tSeqName = $ZConvert(pSeqName,"U")
Set tContext = $ZConvert($Select(pContext'="":pContext,1:"*"),"U")
if $Data(^Sequence(tSeqName))
{
throw ##class(%Exception.SQL).CreateFromSQLCODE("-460","Sequence already exists")
}
else
{
set ^Sequence(tSeqName) = ""
set ^Sequence(tSeqName,tContext) = 0
}
Quit 1
}
/// Drop a sequence if this exist, if it not exist, then return an error message
/// Ejemplo de SQL:
/// select Sequence.DropSequence('TEST')
ClassMethod DropSequence(pSeqName As %String) As %String [ SqlName = DropSequence, SqlProc ]
{
set tSeqName = $ZConvert(pSeqName,"U")
if $Data(^Sequence(tSeqName))
{
Kill ^Sequence(tSeqName)
Kill %Sequence(tSeqName)
}
else
{
throw ##class(%Exception.SQL).CreateFromSQLCODE("-460","Sequence does not exist")
}
Quit 1
}
}
Hi Joyce,
It worked well on this version. Thank you very much!
Best Regards.
Fábio
I am really interested in to know if just change my class definition from %Library.GlobalCharacterStream to %Stream.GlobalCharacter is needed considering that it has the same storage mechanism or there is some diferences where is needed to migrate data from %Library.GlobalCharacterStream to %Stream.GlobalCharacter by writing on the new %Stream.GlobalCharacter stream?
Also when using SQL to insert, update and select %Stream.GlobalCharacter has the same behavior as the %Library.GlobalCharacterStream ?
Hi Sergio,
I don´t know what exactly you are looking for, but you can take a look at both links bellow:
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…
I hope it helps.
Fantastic!
I usually add a HANG command when I want to start debugging
Hang 15
And call the system or app which runs the specific class method, routine, csp, etc.
This hang gives me some time to go to studio and attach my studio debug to that process according to the name.
I agree with Eduard Lebedyuk answer bellow that, SPA don´t work with browser back/forward buttons and consequently with the browser history.
However, I noticed that the pushDocument has a parameter 'nohistory' that uses the mechanism history.pushState when set as 'true'. It is available on %ZEN.Mojo.basePage. I did some test in order to try to help Alexandre and i have noticed that after you pushDocument, popDocument, than click on back or forward browser buttons and than try to pushDocument once again, it does not work correctly as it was.
Does anybory has any thoughts about that?
Yeap! I was trying to use getTemplateForArea(area) and zenPage.loadTemplateNS(), but I couldn´t make it work as I expected.
Good. Thank you very much!
Nice article!!!!
Hi Ben!
In order to clarify your question I have done the following test:


For those who want additional details about when a triggers is fired, here is the documentation url:
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…
Great article!
I use !
Pageviews is related to the UI side. Some UI can have acces to multiple API endpoints and it would not be a good approach. We have tried that already. Also they would not like to use Google Analytics.
Great! I am going to try that and call a rest api async in order to record that. We are concerned about a high volume of user access and have peformance issues.
Hi Cris,
Thanks! I am going contact you as suggested by Ben Spead.
Later on I can post the solution over here.