Introduction

Your application needs to store data. And you usually want to do this in a very structured way. Of course WEM allows you to do all of this and the Data Model area of the WEM Modeler is where you define all the data you need in your application. Here you specify the data you need, what type of data you need, and how all the data should be organized.

Lists

The way WEM organizes data, is through lists. A list is a model of an entity that describes the properties of that entity. E.g. the entity “Customer” has properties such as Company name, Company address, URL, Telephone number, etc. To use such an entity in WEM you would create a list. And in this list you create fields that represent the properties of the list.

There are two types of lists:

  • database list – this type of list stores the data in a database and therefor all this data is also available when you stop using the application and come back at a later time
  • list – this type of list does not store data permanently. Instead it only stores data as long as the application session lasts. So here you would store data that you only need temporarily.
    A good example is a shopping cart of an online store: you can add articles to the shipping cart, but once you leave the online store, or you close your browser, the data is deleted. You no longer need the data (the articles) in the shopping cart so you don’t need to store that data permanently.

Creating a new list

When you click on the Data model node of the project tree on the Home tab, you get to all the data model functionality. You will also see a menu bar with several options:

From the menu bar simply select New list. You can choose whether you want a list or a database list.

You now get a popup where you can enter the following:

  • Name: this is the name you want to give the list. It must be a unique name;
  • Technical name: the technical name is an optional field, but it is advised to use the technical name. This is the name WEM uses to reference this field. You will see this name when you are e.g. using expressions where you need to access this field. You could use the same name as in the Name field, but any unique name will work;
  • Filters: if you want you can use list filters. Before you can add a filter, the list must have been saved and fields must have been added to this list. List filters can be very powerful and are mostly used in the interaction node editor. When you want to add e.g. a data grid, you can use one of the list filters to filter out certain rows when you display the data grid.
    Example: show certain rows only when the user has a particular role (create a filter that filters on user role).

Hit the Ok button and the list is created.

Fields

The list fields is where the data is stored. E.g., if you want to store information about an order, you may want to store information like: ordernumber, order data, customer name, product ordered, price per product, number of products in the order, etc. Each of these items is a field in a list (probably the ‘Order’list).
In WEM you can create fields for every Data Type WEM supports:

  • Boolean (Yes/No)
  • Concept (Single select)
  • Concept Type (Multi select)
  • Date Time
  • Duration (Timespan)
  • File
  • Number (Numeric)
  • Reference
  • Rich Text
  • Text

When a new database list is created, two field are always created as well:

  • ID: this is the unique identifier for a row in a list. The field must be present and cannot be changed;
  • Last modified: this field contains the date of the creatio of a new row for this list. As with the ÌD field, you cannot change or delete the Last modified field.

To add a field to a list, first open the list, and then select New field from the menu bar. You can now select the type of field you want to add. The list is the same as the data types mentioned above. AFter you have selected the type of field you need, you get a popup where you can add additional information that is needed for the field.
A number properties are available for all fields:

  • Name: The name you want to give a field;
  • Technical name: The technical name you want WEM to use throughout the Modeler;
  • Save this field to the database : This checkbox is checked by default. In some cases you may want a field that you want to use temporarily so no data needs to be stored. But normally this box is always checked;
  • Default value : the default value that you want to give this field every time e new row for a list is added.

There are also a number of properties that are dependent on the type of field:

  • Text field
    • Validation: There are a number of pre-defined validation rules that can be applied. E.g. when the validation e-mail is used, WEM checks wether the entered value is a correct email address;
    • Max length: The maximum number of characters that can be stored in this field;
  • Numeric
    • Minimum value: this is the minimum value this Numeric field will accept;
    • Maximum value: the maximum value this Numeric field will accept;
  • File
    • Validation: Here you can select one (1) file forat that is allowed for this file. So if you want to store, let’s say, only pdf files, you can specify that here;
    • Maximum file size: if the file that is stored can only have a maximum size, then you can specify that here. The file size is specified in kilobytes;
    • Allow access when: this is where you can restrict access to this field. You can define the access rule using the expression editor;
  • Single select & Multi select
    • Root concept: you need to specify which concept you want to use for the single select field. Check the Ontology section for more information on ‘concepts’;
    • Depth: if a concept has multiple levels, you have the possibility to specify wether you only want to be able to select the direct children of the concept, or the children of all levels of this concept. Again, check the Ontology section for more information on ‘concepts’;
    • Only concepts with type: you can restrict the available concepts to concepts that have a specific type. Do this by selecting the particular type you’re interested in;
  • Reference
    • Referenced list: a reference field references to another list, so obviously you need to specify to which list this field is referencing. simply click on the button on the right-hand side of the field and a selection popup appears that enables you to select the list that that needs to be referenced to.

Calculated field

Besdies the regular fields, you can also add a Calculated field to a list. A calculated field is a field that contains a value that is calculated. When you add a calculated field, the calculation needs to result in a data type that is the as the data type of the calculated field. The calculation itself is defined using a WEM expression.

Every calculated field has the same properties:

  • Name: The name you want to give a field;
  • Technical name: The technical name you want WEM to use throughout the Modeler;
  • Calculated value: this is where you enter the expression that specifies the calculation.

Edit, move, delete a field or list

The menu bar contains a number of options:

  • Edit is used to change the propreties of a field or list. To edit a field: select the field/list and click the edit button;
  • Move is used to move a field/list to another list or folder . When a field/list is selected and move is selected, a popup appears where you can select the destination of the field/list;
  • Delete is straightforward: delete the field or list you have selected. When you do this, all data that is stored in the database will also be deleted.
    You can only delete a field or list if it is not used anywhere in your application.

Find usages

The Find usages button provides very useful information: it shows where the selected list of field is used in your application. When you need to change something, or delete e.g. a field, you need to know where it is used. This is a simple way to find that out. And even better: you can click on the locations where an item is used so the Modeler will take you to that location.

Folders

When you are modelling a large application, it is not unusual to have many different lists. In order to keep the lists manageable, the WEM Modeler has the ability to create folders and store lists in folders. This way you can create a hierarchy of folders, that reflect your application.
Example: you are building a product management application. When you start out, you realize you need to store product management data, but also data that is used for user authentication. You could end up with a very simple folder strucure that looks like this:

Folders do not offer specific functionality. Their function is to help you structure the way you work with lists (and flowcharts).

Next

Netx, lets look at WEM Modeler Navigation Points.

 +31 (0)20 240 21 20       

Videos and images courtesy of WEM Modeler. © 2019. WEM Modeler.
SitemapPrivacy - Terms - Company

 +31 (0)20 240 21 20       


Videos and images courtesy of WEM Modeler.
© 2019 WEM Modeler.
SitemapPrivacy - Terms - Company