Forms are not required for a data dataabase to function correctly. They make it easy in the Domino Designer GUI to create views, but are not essential. The UNK table used for full-text indexing uses data, not the Forms. As proof of this is the scenario where the same field on different Forms with different data types can result in differences in the UNK table across two servers, because the UNK table is populated based on the first document created for a given field name.
THIS WILL BE COMPLETED IN 4.3.0
Session sess = Factory.getSession(SessionType.NATIVE); Database db = sess.getDatabase("PrivateTest.nsf"); DesignForm form = db.getDesign().createForm(); form.setName("EclipseTest"); FormField field = form.addField(); field.setName("EclipseTest"); field.setKind(Kind.COMPUTED); field.setDefaultValueFormula("@Today"); field.setFieldType(Type.DATETIME); FormField field2 = form.addField(); field2.setName("EclipseTest2"); field2.setKind(Kind.EDITABLE); field2.setDefaultValueFormula("Hello"); field2.setAllowMultiValues(true); form.save();
This creates a Form with two fields - a date/time field computed to today's date and an editable text field with a default value and accepting multiple values. By default, a Form is visible to Notes and Web and fields are also visible to Notes and Web. Visibility of fields is set at paragraph level, which is not currently exposed.