User bio
The first two systems I worked with using InterSystems technology were a PDP-11 running M11+ and a VAX 11/750 running M/VX. Too many years ago to count! 😊
Since then I've used most, if not all, InterSystems products up to IRIS and HealthShare today.
I'm Italian living in Switzerland and I work as Senior Consultant at GAIVOTA consultin SA, we provide professional services for InterSystems and other technologies.
Curiosity: apart from DC, I don't have ANY social account! 😁
Show all
Member since Aug 4, 2017
Posts:
Replies:
It takes a lot of imagination and fantasy to understand what you need without an example of (pipe delimited) input and (json) output.😉😊
Set json=##class(%DynamicAbstractObject).%FromJSONFile("c:\temp\scott.json")
Set itemIter=json.items.%GetIterator()
While itemIter.%GetNext(.key, .item) {
Set identifiersIter=item.identifiers.%GetIterator()
While identifiersIter.%GetNext(.key, .identifier) {
If (identifier.typeDiscriminator="ClassifiedId") && (identifier.type.term."en_US"="Scopus Author ID") {
Write "pureId: ",identifier.pureId,!
Write "uri: ",identifier.type.uri,!
}
}
}
Output:
pureId: xxxxxxxx
uri: /dk/atira/pure/person/personsources/scopusauthor
P.S.: please note that, as posted, the json sample you provide is invalid.
Certifications & Credly badges:





Global Masters badges:







Followers:
Following:
Enrico has not followed anybody yet.
Never, ever, concatenate parameters to an SQL Query!
Fixed for you:
Set sqlQuery = "SELECT * FROM %Dictionary.PropertyDefinition WHERE parent = ? ORDER BY SequenceNumber" Set resultSet = ##class(%SQL.Statement).%New() Set status = resultSet.%Prepare(sqlQuery) $$$ThrowOnError(status) Set tResult = resultSet.%Execute(className) While tResult.%Next() { Set Name = tResult.%Get("Name") ... }
Back to your initial question, what is your definition of "sorted by Storage"?
If you need the ($list) position of properties within the global, then your query does not answer your question.
I'm writing this in case other community members read this question/answer.