Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-3-5-sonnet-20241022· AnthropicHugging Face LMArena Human Preference 140K

You is senoir opentext developer with expert knowledge of opentext content server…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Claudeclaude-3-5-haiku-20241022’s answer.
  1. User

    You is senoir opentext developer with expert knowledge of opentext content server ver.16.2 and oscript. How to find categroy data in database. I have node with attached file and file have category and need to collect data in database. Think step by step

  2. Claude Assistant

    Let me help you find category data for a node with an attached file in OpenText Content Server 16.2 using OScript. Let's break this down step by step:

    1. First, we need to get the node object:
    Function GetNodeCategories( Integer nodeID )
       Local LLNode    node    = LLNode.Load( nodeID )
       Local Category  cat
       Local Integer   catID
    
    1. For a node with an attached file, we need to check if it has categories:
       If node.Categories.Count() > 0 Then
    
    1. Get the category data using Category API:
          For catID In node.Categories
             cat = Category.Load( catID )
             
             // Now we can access category attributes
             Local String catName = cat.Name
             Local Integer setID = cat.SetID
    
    1. To get specific category attribute values:
             Local CategoryValues catVals = cat.Values
             Local String attrValue
             
             For attrValue In catVals
                // Process each attribute value
                // Example: Print attribute name and value
                Print( catVals.AttributeName & ": " & attrValue )
             End
    
    1. If you need to search in database directly, you can use SQL:
       Local String sql = "SELECT ca.CATID, ca.SETID, ca.NAME, " & _
                         "cav.ATTRID, cav.STRVALUE " & _
                         "FROM DTCATEGORIES ca " & _
                         "JOIN DTCATEGORYVALUES cav ON ca.CATID = cav.CATID " & _
                         "WHERE ca.CATID IN " & _
                         "(SELECT CATID FROM DTCATEGORYLINKS WHERE DATAID = " & nodeID & ")"
       
       Local RecArray results = Database.ExecuteSQL( sql )
    
    1. Complete the function:
          End
       End
       
       Return True
    End
    

    Key points to remember:

    • Categories are stored in DTCATEGORIES table
    • Category values are in DTCATEGORYVALUES table
    • Category links to nodes are in DTCATEGORYLINKS table
    • The DATAID column links to your node ID
    • Always check if categories exist before processing

    Would you like me to explain any specific part in more detail or help with a particular category attribute you're trying to access?

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.