LogoLogo
WEM ModelerWEM ReferenceTutorialsMyWEM
  • WEM Platform Documentation
  • Getting Started
    • Introducing WEM
    • Create WEM Account
    • WEM Login
    • MyWEM Portal
      • MyWEM Features
      • MyWEM Support
      • Allow Support Access
    • Partner Portal
  • WEM Modeler
    • Introducing the WEM Modeler
    • Modeler Start Page
    • Manage Projects & Workspaces
    • User Roles Scheme
    • Create a new Project
    • Modeler Application Overview
    • Project Settings
      • Project Configuration
      • Security Settings
      • Portal Settings
      • SMTP Settings
      • Mobile App Settings
    • Expression Editor
    • Flowcharts
      • User Interaction
      • End Node
      • Sub-flowchart
      • Navigation
      • Clear session
      • Decision
      • Assignment
      • List Action
      • Loop
      • Copy Data
      • Save and Discard
      • Import Data
      • Export Data
      • Invoke Webservice
      • HTTP Request
      • Execute Process
        • Different processes explained
        • Send Email
        • Change settings
        • Changing files
        • Generate File
      • Ping server
      • Authenticate
      • Comet Messages
      • OpenAI
      • Async Tasks
      • Note Node
    • Data Model
      • WEM Session Folder
    • Services and Integration
      • Webservices
      • Remote Data Sources
      • Authentication Providers
        • SAML 2.0
          • SAML App Registration in EntraID
        • OAuth 2.0
      • Comet - Real Time Messages
      • Certificates
    • Concepts and Concept Queries
      • Concepts
      • Concept Queries
      • Concept Relations
    • Navigation
      • HTTP Endpoints
      • Tasks
    • Files and Assets
      • Widget Libraries
      • Template Fragments
      • Files
      • Hyperlinks
    • Multilanguage Dictionary
    • Agentic AI
      • WEM AI Agent
      • AI Flowchart Nodes
      • AI User Interaction
    • WEM Preview
    • WEM Runtime
      • Publishing Process
      • Staging
      • Live
    • Debugging
  • Template Editor
    • Interaction Template Editor
      • Interaction Template Hotkeys
    • General and preview
    • Style
      • Heading Type
      • Paragraph Style
      • Text Styling
      • Alignment
      • Hyperlink
      • Tooltip
    • Layout
      • Adaptive columns
      • Div
      • Panel
      • Alert
      • Table
      • Image
      • Icon
      • Label
    • Interaction
      • Form
      • Validation
      • Required field
      • Button
      • Dropdown
      • Free form item
    • Miscellaneous
      • Tabbar
      • Google maps
      • Nested template
      • Script
      • Reference
      • Conditional
      • Data grid
      • Repeater
      • Rich text
      • Custom
    • WMT Tool
  • WEM Reference
    • WEM Expressions Reference
    • Functions
      • Aggregation
        • Average
        • Count
        • First
        • Last
        • Max
        • Min
        • Sum
      • Concepts
        • ConceptId
        • Description
        • FindConcepts
        • GetAncestors
        • GetChildren
        • GetDescendants
        • GetParent
        • Intersection
        • LocalName
        • Synonyms
        • ToConcept
        • Union
      • Date
        • Date
        • DateDiff
        • DateOnly
        • DatePart
        • DayOfWeek
        • FromUnixTimestamp
        • MoveDate
        • Now
        • TimeOfDay
        • Today
        • ToDuration
        • ToLocal
        • ToUnixTimestamp
        • ToUTC
        • UTCNow
        • UTCToday
      • Environment
        • ApplicationId
        • CountryCode
        • CountryName
        • Hostname
        • IpAddress
        • IsFirstRequest
        • IsHttps
        • IsPreview
        • IsStaging
        • IsLive
        • NodeTrail
        • PortalId
        • PortalName
        • ProjectId
        • ProjectName
        • ProjectVersion
        • Setting
        • UrlPath
      • Files
        • FileName
        • FileSize
        • FileUrl
        • MimeType
      • Lists
        • Distinct
        • IsNewRow
        • IsOnRow
        • List
        • NameOf
        • RowId
      • Math
        • Abs
        • Ceiling
        • Cos
        • Distance
        • Exp
        • Floor
        • Log
        • Log10
        • Pi
        • Pow
        • Random
        • Round
        • Sin
        • Sqrt
        • ToNumber
      • Security
        • AesDecrypt
        • AesEncrypt
        • AesIv
        • AesKey
        • CreateJsonWebTokenH256
        • HmacSha256
        • Md5
        • Password
        • PasswordStrength
        • Pbkdf2
        • Sha1
        • Sha256
        • Totp
      • Text
        • AsText
        • Base32ToText
        • Base64ToText
        • CompareFuzzy
        • Concat
        • Contains
        • FormatDate
        • FormatDuration
        • FormatNumber
        • Guid
        • HexToText
        • HtmlAttributeEncode
        • HtmlEncode
        • IndexOf
        • JavascriptEncode
        • JsonEncode
        • Length
        • Padl
        • Padr
        • RegExIsMatch
        • RegExMatches
        • RegExReplace
        • Replace
        • Split
        • StringPart
        • SubString
        • ToBase32
        • ToBase64
        • ToBase64Url
        • ToHex
        • ToLower
        • ToRichText
        • ToString
        • ToTitleCase
        • ToUpper
        • Trim
        • UrlDecode
        • UrlEncode
        • XmlAttributeEncode
        • XmlEncode
        • XPath
        • XPathList
        • XPathNumber
      • Validation
        • HasValue
        • IsEmpty
        • IsKnown
        • IsUnknown
        • IsValidBankaccount
        • IsValidBSN
        • IsValidBTW
        • IsValidEmailAddress
        • IsValidIBAN
        • IsValidPhonenumber
        • IsValidURL
      • Localization
        • AvailableLanguages
        • CurrentLanguage
        • CurrentTimezone
        • LanguageStrategy
        • Languages in WEM
    • Keywords
      • Contains
      • Concepts
        • Ancestor of
        • Child of
        • Concept
        • Descendant of
        • Overlaps
        • Range of
        • Parent of
        • Contains
      • Environment
        • ApplicationRoot
        • Platform
      • Lists
        • In
        • Of
        • Where
        • Contains
        • All
      • Logic
        • And
        • Not
        • Or
        • Choose
        • If Then Else
      • Mobile
        • BatteryLife
        • BuildVersion
        • ConnectivityTypes
        • DeviceId
        • DeviceName
        • IsDevelopmentBuild
        • IsDistributionBuild
      • Text
        • Contains
        • Ends with
        • NewLine
        • Starts with
    • Operators
      • Addition +
      • Division /
      • Equality =
      • Equality-strong ==
      • Greater-than >
      • Greater-than-or-equal >=
      • If-unknown ?
      • Inversion -
      • Less-than <
      • Less-than-or-equal <=
      • Logical-and &, and
      • Logical-not !, not
      • Logical-or |, or
      • Modulo %
      • Multiplication *
      • Power ^
      • Subtraction -
      • Unequality <>
    • Data Types
      • Text
      • Number
      • Yes / No (Boolean)
      • Date Time
      • Duration
      • File
      • Rich Text
      • Concept
      • Conceptset
      • Reference
    • SQL Compatibility
      • Functions
      • Keywords
      • Operators
    • Content Security Policy
    • WEMScript for Custom HTML
    • WEM Widgets
      • WEM Widget Structure
      • WEMScript for Widgets
      • Widget Editor
      • Content Placeholder
    • WMT
      • File Structure
      • Basic Functional Template
      • Styling
      • Font Icons
      • Reference
        • Breadcrumb
        • Button Bar Buttons
        • Common Scripts
        • Common Styles
        • Conditional
        • Content
        • CSP
        • CSP Nonce
        • Expression
        • Hidden Fields
        • Language Select
        • Navigation
        • Node ID
        • Node Name
        • Placeholder
        • Placeholder Conditional
        • Startup Scripts
        • Template Fragment
        • Uses
    • Regression Test Framework
      • WEM Test Script
  • Tutorials
    • Tutorials
      • Making a Change Log
      • Placeholders for end-users
    • First Application
      • Expand First Application
    • Video Tutorials
      • By Partners
      • Security
    • Building Widgets
      • Basics
        • 1. Introduction
        • 2. Hello, World!
        • 3. General
        • 4. Properties
        • 5. Events
        • 6. Styling
        • 7. View State
        • 8. Resources
        • 9. Placeholders
        • 10. Template Editor Script
        • 11. Global Scope
        • 12. Risks and Responsibilities
        • 13. Conclusion
      • In-depth
        • 1. Introduction
        • 2. Platform Availability
        • 3. Development Workflow
        • 4. Properties
        • 5. View state
          • 1. Runtime.viewState
          • 2. sessionStorage
          • 3. Summary
        • 6. Styling
        • 7. Events
          • 1. Navigation
          • 2. Row position
      • WEMscript
        • 1. Introduction
        • 2. Variables
        • 3. Properties
        • 4. OutputId()
        • 5. Register Input - Required
        • 6. Encoding
        • 7. Script Block - Introduction
        • 8. Types
          • 1. Boolean
          • 2. Concept
          • 3. ConceptSet
          • 4. Datetime
          • 5. Duration
          • 6. File
          • 7. Number
          • 8. Richtext
          • 9. Text
        • 9. Script Block - Global Scope
        • 10. Script Block - ES Modules
        • 11. CSS - attachShadow
      • Examples
  • Tips and Tricks
    • Tips and Tricks
      • Keyboard Shortcuts
      • Video's in WEM
      • Extracting text from File
    • Custom Hostnames
    • FAQ
    • Expressions
      • Order of Operators
    • Processes
      • Email Process
      • Tips for creating PDF's
      • ZIP Archive Process Node
    • Concepts
      • Concepts and Runtime
    • Working with data
      • The Power of the Calculated Field
      • Consuming your OData source with Excel 2016
      • Expose your data via OData
      • Using OData to transfer data between runtimes
      • WEM Storage Options
    • Integration
      • Integrating external systems
      • Json
      • Single Sign-on
      • Office365 Integration
    • Performance
      • Performance Tips
      • Performance Profiler
      • Template Performance Profiler
      • The Split Loop
    • Security
      • 2FA with TOTP
      • Blacklist or whitelist IP addresses
    • Widgets
      • Advanced Charts
        • Boxplot Chart
        • Brush Chart
        • Bubble Chart
        • Candlestick Chart
        • Card with Chart
        • Effect Scatter Chart
        • Heat Map
        • Line, Area and Bar Chart
        • Map-Bar Morph
        • Mix Time Line Chart
        • Nested Pie Chart
        • Polar Area Chart
        • Polar Bar Chart
        • Profit Chart
        • Radial Bar Chart
        • Radial Bar Gauge
        • Range Bar Chart
        • Rosetype Pie Chart
        • Sankey Energy Chart
        • Scatter Chart
        • Scatter-Aggregate-Bar Chart
        • Stacked Columns Chart
        • Stepline Chart
        • Treemap
      • Advanced Input
        • Color Picker
        • Conceptset Image Selector
        • Google maps locator
        • Multi select input button
        • MultiFile Upload
        • On/Off switch
        • Process Arrow Steps
        • Rate
        • Rating view
        • Single select input button
        • Slider
        • Tree
      • Template Actions
        • Follow exit
      • Global widgets
        • Agenda
        • Audio Player
        • Calendar
        • Draw Signature
        • Grid Widget
        • Image capture
        • Kanban Board
        • Path
        • Progress Bar
        • reCAPTCHA
        • Timeline
      • Document widgets
        • Json Viewer
        • PDF Viewer
    • Various
    • Go to MyWEM
Powered by GitBook
On this page
  • Introduction
  • Folders
  • Lists
  • Creating a new list
  • Default Label
  • Fields
  • Calculated field
  • Find usages

Was this helpful?

Export as PDF
  1. WEM Modeler

Data Model

PreviousNote NodeNextWEM Session Folder

Last updated 3 months ago

Was this helpful?

Introduction

Your application needs an efficient and structured way to store data. WEM allows you to do this at the Data Model area of the WEM Modeler. Here, you specify the data you need, what type of data you need, and how all the data should be organized. Just like the other resource tabs the datamodel tab has a search function that can use the name and technical name to look for a specific folder, list or field from your model. When hovering over the results the name and its technical name are shown in a tool-tip.

Folders

When you are modelling a large application, it is not unusual to have many different types of data stored in your application. In order to keep the lists manageable, the WEM Modeler has the ability to create folders and store data in lists, in these folders. This way you can create a hierarchy of folders that reflect your application.

For 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 structure 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 as well).

Lists

The way WEM organizes data, is through lists. A list is a model of an entity that describes the properties of that entity. For example, 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 in the datamodel, and in this list create fields that represent the properties of the entity.

There are two types of lists:

  • Database list - this type of list stores the data in a database, and therefore all data is remains available when you stop using the application and come back at a later time

  • Transient list - this type of list does not store data permanently. Instead it only stores data as long as the application session lasts. You would store data in a transient list when you only need temporarily. A good example is a shopping cart of an online store: you can add items to the shopping cart, but once you leave the online store or you close your browser, the data is deleted. You no longer need the data (the items) in the shopping cart so you do not need to store that data permanently.

Creating a new list

When you right-click or use the context menu button [...] on items in the Data model-tab, you get to all the data model functionalities. You will also see a menu with several options:

After you select New list, you 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 automatically generated field. This is the name WEM uses to reference this field. You will see this name when you are, for example, using expressions where you need to access this field.

  • Description: Add a description for this item. This description is informational only within the Modeler, available to any Modeler User with access to the project.

  • List type: You can choose whether you want a transient list or a database list. The rows of a database list are stored in the database of the project. The data in a transient list have the lifetime of the client session.

Hit the Save button and the list is created.

Default Label

Introduced 2022-06-27, you can define a Default Label on a List (entity), using an expression that can use fields from the list to generate a Label-Field for one (and each) specific row when it is used as Reference Input Field in a form (and you do not specify a custom Option Label).

Fields

Fields are where the data-elements are stored. For example if you want to store information about an order, you may want to store information such as order number, 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 (for example in the "Order" list).

You can create Fields outside a list - in that case, the Field can hold only one piece of information during each user-session. These are also called Session Fields.

  • Boolean (Yes/No)

  • Single select (concept)

  • Multi select (concept set)

  • Date Time

  • Duration (time-span)

  • File

  • Number (numeric)

  • Reference

  • Rich Text

  • Text

When a new database list is created, two field are always created with the list:

  • ID: this is the unique identifier for a row in a list. This field is required and cannot be changed;

  • Last modified: this field contains the date of when a specific row is last modified. As with the ÃŒD field, you cannot change or delete the Last modified field.

To add a field to a list, right-click on the list and select New field pop-up window. 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 of properties are available for all fields:

  • Name: The name you want to give a field;

  • Technical name: The technical name that WEM uses throughout the Modeler;

  • Description: Add a description for this item. This description is informational only within the Modeler, available to any Modeler User with access to the project.

  • 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 a 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: A number of pre-defined validation rules can be applied. For example when the validation e-mail is used, WEM checks whether the entered value is a correct email address;

  • 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: Allows you to select one (1) file-type that is allowed for this field. 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. This field is required when you create a File field, and should be put to True when used without any constraints;

  • Single select & Multi select

    • 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 refers to another list, so obviously you need to specify to which list this field is refering. Simply click on the button on the right-hand side of the field and a selection pop-up appears that enables you to select the list that that needs to be referenced to.

  • Edit is used to change the properties 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, thus will 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 an item if it is not used anywhere in your application.

Careful when decreasing max-length for text!

When you create text-fields in a persistent data list, its size is set to 50 characters by default.

Once the list has been used and data exists, this size should NOT be decreased.

This is a technical restriction by the database server, and WEM Modeler cannot know in advance whether or not the size can be decreased because it cannot check the data in the runtime databases (preview/staging/live). Therefore, the option to decrease the size is still available, but should be used with care.

So, our advice: do NOT change the max-length of a text-field in a persistent list when there may be data in the list in Runtimes.

Think well about the field and its intended usage at the time you create it and set the proper size at that time!

You can always start small and increase the size.

If you do change the size and make it smaller, you may get Server500 errors on Preview with a message like:

Failed to create or update the wem runtime database "WemPreviewProject[xxxxx]". See the inner exception for details.

Or, you may get a similar message when publishing.

The technical information will show the specific field in the specific list which causes the failure.

Calculated field

Besides 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 same as the data type of the calculated field. The calculation itself is defined using a WEM expression.

A Calculated Field in a List does NOT store a value in the database, but its Expression is always evaluated and executed at the point where it is used (in a node in a flow, or in another expression).

Every calculated field has the same properties:

  • Name: The name you want to give a field;

  • Technical name: The technical name WEM uses throughout the Modeler;

  • Type: The type that the expressions should yield as result (only available when creating a new calculated field);

  • Calculated value: this is where you enter the expression that specifies the calculation.

Find usages

The Find usages button provides very useful information: it shows where the selected element is used in your application. When you need to change something or delete a field, you need to know where it is used. This is a simple way to find out whether that is possible, and even better, it allows you to go to the locations where an item is used if you want to change or delete it.

In WEM you can create fields for every WEM supports:

Max length: The maximum number of characters that can be stored in this field; it is set to 50 by default. If you enter a value larger than 2048, the value will show 2048, but this will technically be changed to nvarchar(max) in the database (approx. 1 billion characters).

Root concept: you need to specify which concept you want to use for the single select field. Check the for more information on 'concepts';

Depth: if a concept has multiple levels, you have the possibility to specify whether 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 for more information on 'concepts';

Data Type
Ontology/Concept section
Ontology/Concept section
**
Setting the default label
Setting the input field and leaving the Option Label empty
The result is showing the Default Lable