Hello again Benjamin!
Thank you for the quick reply.

The EntityAPI would indeed do the job for the query above but I haven't found any API for the query below. However, I found out that $SYSTEM.SQL.Execute() does precisely what I need!

I have a few more minor questions about strings if you don't mind.

  1. Is string addition/concatenation possible in Object Script? set query = "select * from " + tableName
    I've read "Basic String Operations and Functions" but didn't find any answers. 
  2. Does Object Script supports multiline strings? The query below is very long and it would look nicer if it could be divided it into multiple lines.

SET myquery="select Master->EntityValue , Relation->EntityValue , Slave->EntityValue, source.SourceId FROM %iKnow_Objects.CrcUnique crc  JOIN %iKnow_Objects.CrcInSourceDetails as source ON crc.CrcUniId = source.CrcUniId WHERE source.DomainId = 1 AND Relation->EntityValue LIKE 'ring%' ORDER BY CorpusFrequency  DESC " 
	
SET result=$SYSTEM.SQL.Execute( myquery )
	
DO result.%Display()

The query should look for CRCs containing some words, and then return the CRC and the source that contains the CRC

Hello! 

I'm sorry for the confusion. We are doing a qualitative study on a set of documents to see if we can find important features in them. What we want to do is answer the question "Which of these documents contains this CRC". 

I don't know if this is easier to do client side or server side but it don't think it matters in our case. The reason I wrote Atelier was because I thought that was the simplest way to get started for a beginner. 

If you have any suggestions on alternative methods I'd be happy to hear them!
I know PHP and SQL, is it possible to query iKnow from PHP? It seems possible but I could find anything on Learn -> FAQ or Google. If it's possible I would greatly appreciate if you could point me to some documentation on the subject.

Thank you all for the great answers!   

Hello Benjamin!

I haven't used Caché ObjectScript before but I'll glady learn it if it's the best way to interact with iKnow. 

Thank you for the video. I think understand the fundamantals about CRCs and paths and all. What I don't understand is how to write a program that can do what the Knowledge Portal does.

In our case we have a lot of phone calls that has been transcribed to text. What we want is to give each call a score based on if they contain some CRCs or not.  The scoring can be done elsewhere but from iKnow need to extract the set of calls that contains some CRCs.

 

I tried running your code in the terminal and it worked great. However, there seems to be a problem running it in Atelier. What I did was: New -> Routine File -> COS Routing (.mac). I didn't choose any optional package, then pasted your code. 

I'm very thankful for all the help!