Content Management and Capture

Content Management and Capture

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  IBM Content Navigator - Setting properties to result set from custom search

    Posted Wed August 19, 2020 01:33 PM

    Developing a custom search functionality via plugin. Followed the sample 'Custom repository search service' from the redbook. Unable to set the custom properties of the document unless the list item is selected from the results. Only the default properties are being set after the search is complete. Any advise would greatly help.



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 2.  RE: IBM Content Navigator - Setting properties to result set from custom search

    Posted Thu August 20, 2020 02:37 AM

    Hi,

    I think the custom properties are not returned from your query. You need to include the custom properties in your query. And in your plugin code, you also need to add these properties to JSONResultSetRow.

    The custom property can be set when you selected from the results because that's the content list's feature. It will trigger a new request to get all the properties from server.

    Thanks,

    Jason



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 3.  RE: IBM Content Navigator - Setting properties to result set from custom search

    Posted Mon August 24, 2020 09:06 PM

    Hi Jason,

    That seem to work, but I'm having difficulty figuring out the data type of the property. The below line is throwing an error as it is not able to convert different types (like datetime, etc) to string

    Iterator<?> pit = doc.getProperties().iterator();

    while(pit.hasNext()) {

    Property pr = (Property) it.next();

    row.addAttribute(pr.getPropertyName(), pr.getObjectValue().toString(), "xs:string", null,pr.getObjectValue().toString());

    }



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 4.  RE: IBM Content Navigator - Setting properties to result set from custom search

    Posted Mon August 24, 2020 09:07 PM

    Hi Jason,

    That seem to work, but I'm having difficulty figuring out the data type of the property. The below line is throwing an error as it is not able to convert different types (like datetime, etc) to string

    Iterator<?> pit = doc.getProperties().iterator();

    while(pit.hasNext()) {

    Property pr = (Property) it.next();

    row.addAttribute(pr.getPropertyName(), pr.getObjectValue().toString(), "xs:string", null,pr.getObjectValue().toString());

    }



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 5.  RE: IBM Content Navigator - Setting properties to result set from custom search

    Posted Mon August 31, 2020 06:07 AM

    Hi,

    When I am checking the API, I found the second parameter should be an object value:

    void com.ibm.ecm.json.JSONResultSetRow.addAttribute(String id, Object value, String type, Stringformat, String displayValue)

    Maybe this is the fail reason?

    Thanks,

    Jason



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 6.  RE: IBM Content Navigator - Setting properties to result set from custom search

    Posted Mon August 31, 2020 06:07 AM

    Hi,

    When I am checking the API, I found the second parameter should be an object value:

    void com.ibm.ecm.json.JSONResultSetRow.addAttribute(String id, Object value, String type, Stringformat, String displayValue)

    Maybe this is the fail reason?

    Thanks,

    Jason



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 7.  RE: IBM Content Navigator - Setting properties to result set from custom search

    Posted Mon August 31, 2020 06:07 AM

    Hi,

    When I am checking the API, I found the second parameter should be an object value:

    void com.ibm.ecm.json.JSONResultSetRow.addAttribute(String id, Object value, String type, Stringformat, String displayValue)

    Maybe this is the fail reason?

    Thanks,

    Jason



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration