I want to make a view in a database via Java that has a column that is both sorted and categorized.
I have figured out how to make a view, and how to make a column that is sorted:
db.createView(“ViewName”, “”).createColumn(1, “Form”,”Form”).setSorted(true);
I need it to also to be categorized. In the java API for note (NCSO.jar) there is a method like:
db.getView(“ViewName”).getColumn(1).isCategory();
I need the opposite of that, like : .setCategorized(true);
Hope somebody can help me.
Ps: in the gui you do it via this panel, under Type:
GUI part
It appears to be an oversight of the API. I’ve never seen a way to set a view column to be categorized.
It is awkward, but you might have success using the copyColumn() method. In this case you’d need a dummy view, with a single categorized column, that you use as a template. Then call createView() with a templateView parameter. Then you could either just change the properties of that categorized column, or copy it if you need more than one categorized column.