You have to have Data Collection enabled to be able to create and publish forms.

Data Collection module allows you to create and publish forms connected to BellaDati Data Sets.

Creating Form

Navigate to Data Set for which you want to create the form. Click on Data Collecting Forms in left navigation.

BellaDati will list all existing forms. Click on the New import form button.


You can generate formbased on existingtable structure. Check Generate according to data set model to have form prepared for you.


Creating Form Elements

To create form element, provide its name, type and click Add button. BellaDati offers following input types:

(Default values can be set for text, select boxes, and dates)

Mapping Elements to Data Set Columns

In order to map form element to data set column, click on the element name and select one of the Attributes or Indicators.

Endpoint URL - Executes endpoint after form submitting. If "ERROR;any text" is returned, validation will fail and text will be displayed

Store value to report variable - When activated, new input with Variable name will appear. Set name of variable from report. After form is submitted, value of element will be set to report variable

Required - Will set element as required. If value for element will not be set when submitting, element will highlight red and form submit will not be executed.

Default value - If default value is set, this value will be set when form is loaded. Function can be also used (for example now())

Autosubmit form after selection - This functionality is useful when selecting value in one select box should invoke some operation. For example you can select month and according to selected month you can display using formula on second item how many days it has.

Format - For time element it is possible to specify format type. e.g. HH:00, HH:mm etc


General settings

To edit general settings, click on Name of your Form collection.

Save button label - Allows you to set any text for your save button. You can also do localization.

Edit row attribute -  you can set the matching of attribute. According to match value row will be edited. Match only unique value attribute.
You can load our report containing Form with parameter http://localhost:8080/bi/report/detail/965?vr:rowUid=3. When Edit row attribute is set to any attribute, and this attribute contains record with value 3, this row will be edited.

After submit JavaScript - when form is submited this JavaScript will be executed. See example

window.setTimeout(function() {
  window.parent.layoutReload(true);
  window.parent.Kaelyn.closeAll();
},1000);

After submiting Form in pop-up, this pop-up will be closed, and report will be updated.

Formula can also be used here. See example

var x = '{formula}filter("L_ATT2 in (\'A1\')") {return L_ATT3_FIRSTVALUE;}{formula}';
window.parent.open("http://localhost:8080/bi/report/detail/123?parameter2="+x);

After submit formula - when form is submited this groovy formula will be executed. This is same analogy as After submit JavaScript

Here is an example of groovy formula reading and writing data to dataset.

When "ROW_UID" is present in the data, it does update

def rows = readDataset(450, -1, filter).collect { row ->
    def r = [ROW_UID:row.rowId]
    r.putAll(row.getValues())
    r
} 

Hide form on success - This will display only success message and will hide all forms elements.
Success message - Success message can be edited. Can be set differently for any language.

Edit items formula

Select and Hidden item can use formula to dynamically load values. Only if Select does not have any default values set, formula can be used.


Here is an example of loading value from variable, filtering data in different dataset (FORMS_2) and using allValues function to retrieve all values from L_ATT2, where L_ATT1 is our selected variable.

def cV = []
def val = @sel1
if (val=='' || val == null){val="A"}
filter("L_ATT1 IN ('"+val+"')") {
      cV=allValues('FORMS_2','L_ATT2')
}
return cV  


Publishing Form

Click on Fill form from Data Collecting Forms list. BellaDati will open new window.

Distribute URL of this form to all users responsible for collecting data.



Field with type username is not visible. Username of logged in user will be recorded.


Default formats for date/time columns:

TypeFormatExample
Dateyyyy-MM-dd2016-12-31
TimeHH:mm:ss.SSS22:33:44.555
DateTimeyyyy-MM-dd'T'HH:mm:ss.SSS'Z' (ISO 8601)2016-12-31T22:33:44.555Z


Managing Forms

You can create multiple forms. Click on New import form to add new one.
You can modify form anytime by clicking on its name.

Watch VIDEO TUTORIAL

Visit BellaDati YouTube channel for more tutorials