Kurro Lopez · Apr 26, 2021 go to post

Thanks mate for your answer.

My goal was create an string with all codes of activity from a list, and it should be in order alphabetical because the list could be in other order and this key should be the same

ClassMethod CreateKey(pList As %Collection.ListOfObj) As %String
{
        for i=1:1:pList.Count()
        {
            set code = pList.GetAt(i).Codigo
            set list(code)=""
        }
        
        set myKey = ""
        set key=$ORDER(list(""))
        while (key'="")
        {
            set myKey = myKey_key_"#"
            set key=$ORDER(lista(key))
        }

        return myKey 
}

Thanks for all your time and all explications about this.

Best regards,
Kurro

Kurro Lopez · Apr 28, 2021 go to post

It's a good idea, but I haven't the ID of the row.

My idea was use the object as a parameter to pass a lot of values, and the query reads these values, instead of pass one by one the params.

I've changed my query with all of the parameters that I need to run the query

Query GetInfo(pKeyProcess As %String, pCodeSpecialist As %String, pCodeProvider As %String, pCodeCenter As %String, pDate as %TimeStamp) As %SQLQuery(CONTAINID = 1, ROWSPEC = "IdList:%String,IdProcess:%String,Duration:%String")
{
    SELECT IdList, IdProcess, Duration
    FROM Kurro.MyClass
    WHERE KeyProcess = :pKeyProcess
    AND CodeSpecialist = :pCodeSpecialist
    AND CodeProvider = :pCodeProvider
    AND CodeCenter = :pCodeCenter
    AND Date = :pDate
}

It works, but I need to pass all params. I wanted to create a class to pass all parameters, like a c# method, and try to use itself.

Thanks for all mate.

Kurro Lopez · Apr 29, 2021 go to post

Great!!!!

The problem was calling the Query using the "func" function, calling directly it works.

good point.

Thanks for all,
Kurro Lopez

Kurro Lopez · May 10, 2021 go to post

Delete class from Ensemble

set classToDelete = "mypackage.myclass"
if ($$$ISOK($system.OBJ.IsValidClassname(classToDelete)))
{
    do $system.OBJ.Delete(classToDelete,"e")
}

Remove a Host from production

set productionName = "mypackage.myproduction"
set itemName = "NameItemInProduction"

If ##class(Ens.Config.Item).NameExists(productionName,itemName,.idItem)
{
    Set production = ##class(Ens.Config.Production).%OpenId(productionName)
    Set objItem = production.FindItemByConfigName(itemName)
    Do production.RemoveItem(objItem)
    Set st = production.%Save()
    Do ##class(Ens.Director).RestartProduction(0,1)
}

I hope this code helps you.

Best regards,
Kurro Lopez

Kurro Lopez · May 14, 2021 go to post

Hi Utsavi,

Thanks for all. I always say "I'm not so important that to have a problem that nobody knows"

Remember, there'll always be someone who doesn't know how to do something that you do with your eyes closed, share knowledge.

Welcome to the community, We look forward to your collaboration.

Best regards,
Kurro Lopez

Kurro Lopez · Sep 24, 2021 go to post

Hi Sean,

I've created my Business Operation using the wizard to create SOAP Client.

I've modified the object to change the location and namespace according to the provider. This value is into the message.

This is a pice of the code:

Method MyMethod(pRequest As MyMessageWS.RequestsearchInfoRequest, Output pResponse As MyMessageWS.RequestsearchInfoResponse) As%Library.Status
{
    do..prepareOperation(pRequest)
    Set tSC = ..Adapter.InvokeMethod("searchInfo",.info,pRequest.idSpeciality,pRequest.listaActs,pRequest.healthCenter,pRequest.aditionalInfo)
    Quit:$$$ISERR(tSC) tSC
    Set tSC = pRequest.NewResponse(.pResponse)  Quit:$$$ISERR(tSC) tSC
    Set pResponse.InfoCentro=$get(info)
    Quit$$$OK
}

Method prepareOperation(pRequest As MyMessageWS.Request.base) As%Status
{
 Set..Adapter.%Client.Namespace = pRequest.Namespace
 Set..Adapter.%Client.Location = pRequest.Url
 Quit$$$OK
}

The problem is the InvokeMethod is raising the error, so I'm not able to modify this code. It's part of the %Soap library.

Kurro Lopez · Sep 29, 2021 go to post

Hi,

The $HOROLOG is the cache datetime format, then the first part is de date and the second part is the time. The time is in seconds, then if you want to increase 15 minutes, you should to plus the time (15*60)

This is a example:

It only works if you are in the same day, because it raises an error

The best way to increase minutes, days, months, etc... is using $system.SQL.DATEADD method

https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…

Best regards,
Kurro

Kurro Lopez · Oct 11, 2021 go to post

If you are missing other templates from Atelier or Studio... add the following links:

Installer Wizard

"Installer Wizard": "${serverUrl}/isc/studio/templates/%25Installer.InstallerWizard.cls?Namespace=${namespace}${serverAuth}"
 

DeepSeek PI Wizard

"DeepSeek PI Wizard": "${serverUrl}/isc/studio/templates/%25DeepSee.Template.DeepSeeKPIWizard.cls?Namespace=${namespace}${serverAuth}"
 
Best regards,
Kurro Lopez
Kurro Lopez · Oct 28, 2021 go to post

Very good presentation. They are a true trio of pocker aces to win

And all the crew that are in the same ship

Kurro Lopez · Dec 20, 2021 go to post

Congratulations to all community members
Felicitaciones a todos los miembros de la comunidad
Parabéns a todos os membros da comunidade
コミュニティメンバーの皆さん、おめでとうございます
恭喜所有社區成員
I'm sorry for the translations, I just wanted to extend congratulations to all the communities.smiley

Kurro Lopez · Feb 17, 2022 go to post

Thanks Julian.

I thought that the rules were sequential, that is, if it met a rule, it was executed, regardless of the order.
So if a rule is met, it is executed and the "return" command causes it to exit the process.

Thanks for all.

Kurro Lopez · Mar 4, 2022 go to post

You are right.

In Europe we have the same problem when started the Gregorian calendar.

October 4th 1582 was in Julian calendar (thursday) and the next day (friday) was October 15th 1582...

If you want to retrieve the October 10th 1582... in theory that day never existed

Kurro Lopez · Apr 27, 2022 go to post

Thanks Robert but it wasn't a firewall problem.

The problem was due the instalation didn't compile the code correctly. It doesn't get the version of ISC as expected.

I'm using the version WebTerminal-v4.9.3, in the line 1507 there is a initialization of the parameter iscProductVersion

<Parameter name="iscProductVersion">
<Description>
In older Cache versions, method "GetISCProduct" does not exists</Description>
<Expression>$case(
        ##class(%Dictionary.CompiledMethod).IDKEYExists("%SYSTEM.Version", "GetISCProduct"),
        1: $CLASSMETHOD("%SYSTEM.Version", "GetISCProduct"),
        : 2
    )</Expression>
</Parameter>

Later, in line 1611, it checks what is the version to set the role required:

set requiredRole = $case(..#iscProductVersion >= 4, 1: "%DB_IRISSYS", : "%DB_CACHESYS")

But, if I check what is my version, the answer is 3, instead of 4, so it was trying to set %DB_CACHESYS instead of %DB_IRISSYS, so the compilation didn't end.

w##class(%SYSTEM.Version).GetISCProduct() 
3

Then, I've modified the file and change the comparison  ..#iscProductVersion to check if is equal or upper than 3, and it works.

In the line 1730, there is other comparison to set the dbPrefix, so I've modified this line also.

set dbPrefix = $case(..#iscProductVersion >= 3, 1: "IRIS", : "CACHE")

Now, I have the Webterminal worning fine.

Note: I'm using IRIS for Windows (x86-64) 2021.1 (Build 215U) Wed Jun 9 2021 09:39:22 EDT

Best regards,
Francisco Lopez

Kurro Lopez · Jul 25, 2022 go to post

Thanks John,

We've reinstalled it using the dowload packaged from the website. Now it works.

This is the second time that the link in the WebTerminal doesn't work.

Thanks againg mate.

Best regards,
Francisco Lopez

Kurro Lopez · Aug 16, 2022 go to post

Congratulation... next challenge... 15,000 members and 10,000,000 views  🥳🥳🥳🥳🥳

Kurro Lopez · Sep 20, 2022 go to post

Hi,

Indeed, the problem was caused because the address to which it is going to connect is variable, so the component is not configured with the Server or URL parameters.

I've solved it by the following way:

set..Adapter.HTTPServer = pRequest.Url
Set URL = pRequest.Url_"/search"set tHttpResponse = ##class(%Net.HttpResponse).%New()
set tSC = ..Adapter.SendFormDataArray(.tHttpResponse,"POST",tHttpRequest,,,URL)

if$$$ISERR(tSC) && (tHttpResponse="") $$$ThrowStatus(tSC)

// Check what is the status codeset content = ""while (tHttpResponse.Data.AtEnd = 0) { 
    set content = content_tHttpResponse.Data.Read() 
}

do pResponse.%JSONImport(content)
set pResponse.StatusCode = tHttpResponse.StatusCode

Regards,
Kurro Lopez

Kurro Lopez · Feb 4, 2023 go to post

I just uploaded my app... It is the first time that I participate in one of the programming contests... I hope you like it.

Kurro Lopez · Feb 13, 2023 go to post

WOW!!!! this is the first time that I participate in a Intersystems contest and it won't be the last... thanks for all voted and congrats to the winners

Kurro Lopez · Mar 14, 2023 go to post

Thanks, but in that instance of IRIS there wasn't any ZPM before. How to remove the actual installation?

Kurro Lopez · Mar 14, 2023 go to post

The error about module.xml is the ZPM installation, not for a package that I want to install 

Kurro Lopez · Apr 19, 2023 go to post

Thanks for the solution.

I'm using several templates of texts so It will be essential in my future developments

Kurro Lopez · Jun 1, 2023 go to post

Thanks, it is our Plan B... we're going to create a BP that calls to the provider and uses the variable.

Great answer, thanks mates