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
  • What is a Concept Relation
  • Relation Types
  • Relation Type Properties
  • Concept Relations
  • Relation Properties
  • Adding a Relations
  • Using Concept Relations
  • Concept Queries
  • Result
  • Examples
  • List of specific model type of cars.
  • Alternatives Ways to use concept queries.
  • Cleaner Concept Query
  • Relations in expressions
  • Where can concept relations be useful

Was this helpful?

Export as PDF
  1. WEM Modeler
  2. Concepts and Concept Queries

Concept Relations

PreviousConcept QueriesNextNavigation

Last updated 3 months ago

Was this helpful?

What is a Concept Relation

Besides the hierarchical structure in Concepts and creating Parent-Child relations, the WEM Ontology feature also allows you to create Custom Relations between Concepts, making cross-references possible. You can create a very intricate "model" of a specific "reality".

On this page we will explore what relations are, how to use them and how to create your own custom relation types. By understanding and utilizing relations in your projects, you will be able to incorporate dynamic multi and single select fields, as well as subsets of concepts from different levels on the hierarchy tree. To properly utilize concept relations, it is crucial to comprehend and apply several important components. We will first explain these key components and then provide a step-by-step guide using two examples.

First, it is important to understand what concepts are, you can read up on them . When you add concepts to the project you create a static hierarchy visualized by the different levels in the tree view. This establishes a connection between the concepts and their higher levels.

Relation Types

In the example above you have the models of cars with a connection to the above brand level because they are a part of that concept. However, there is no connection between the car types and the models. This issue can be resolved through concept relations. The relations in the image are of one type and can not be changed later. The 'polo' concept will always be under Volkswagen, you cannot just move it around to create relations with different concepts.

Before you start connecting concepts and set up new relations, you need a way to define the type of relation. There are a few default relation types that are already defined when a project is created. One such type is the 'is parent of' relation. The 'is parent' relation type is one you automatically use, when you look at the image above, the concept Toyota is parent of the concept Yaris. In this case you go from lower level up to a higher level above, you can also look at it from the other side, The Yaris concept 'is child of' the Toyota concept, 'is child of' is the inverse name of 'is parent of'. In this case, the relation type is not symmetric; the meaning changes depending on the direction of traversal (up to down or down to up).

there are several built-in relation types that are immutable. These relation types are specifically designed to link to Text data fields or literal values. The default relation types include:

  • Has the Alternative Term: This relation type is used to link a concept to a alternative term or synonym.

  • Has the Description: This relation type connects a concept to a descriptive text.

  • Has the Display Name: This relation type links a concept to a display name, which is the name shown in the user interface.

These built-in relation types are integral to the functionality of Concept Queries and cannot be modified. They ensure consistency and reliability when querying and managing concepts within the platform.

Symmetrical vs Asymmetrical

Symmetrical relations are those where the relationship between two concepts remains the same, regardless of the direction of traversal. In other words, if Concept A is related to Concept B, then Concept B is also related to Concept A in the same way. The relationship is reciprocal and equal in both directions. For example, in a symmetrical relation, if Concept A is a sibling of Concept B, then Concept B is also a sibling of Concept A.

Asymmetrical Relations: Asymmetrical relations, on the other hand, are those where the relationship between two concepts differs depending on the direction of traversal. The relationship is not reciprocal or equal in both directions. For example, in an asymmetrical relation, if Concept A is a parent of Concept B, it does not imply that Concept B is a parent of Concept A. The nature or meaning of the relation changes depending on the direction of the relationship.

To add a relation type you go to the concept and concept queries tab in the resource pane on the left and find the folder concept relation types. When you expand the folder you will see the types of relations already made. Open the context menu of this folder by selecting the three dots or right click on the relations folder, this will open a context menu with a the options to create relation types and a option to open the concept relations overview of this project.

Relation Type Properties

  • Name - The name given to the relation type. It is strongly advised to have a name that properly matches its function.

  • Symmetric - Toggle this when a type functions the same both ways.

* only when the symmetric option is toggled off.

Concept Relations

The concept relations in your project are managed from the Concept relation page, you can create new relations with the green button on the right. Below the green button you find a filter to make finding the right relations easier, when you go to this page from a concept this is filled in to just show relations with that concept. In the image below you will see what this page looks like the first time you go to this page and it is still empty. When you are sure you added a relation but cant find it in this screen make sure the filter is reset, this can be easy to miss.

Relation Properties

  • From Concept - The starting point of the relation, interpret the relation type name from this concept.

  • Relation type - The type of relation you want to make,

  • Show the inverted... - For asymmetric relations you can use this toggle switch to the inverted or other side of the relation.

  • To concept(s) - This is the other side of the relations, Here you can add one or more concepts to apply the relation to. When making one to many relations this can speed up the process. This is where it can be useful to use the show inverted option.

Adding a Relations

Once a relation is created, it appears on the concept relations screen. The concept from which the relation is interpreted is shown on the left. The relation type is displayed in the middle, with the other side of the relation on the right. On the far right, you can still see the properties used to create these relations. Even though we selected a set in the 'To concept' field, three rows are added to the concept relations screen.

Using Concept Relations

Concept Queries

Open the context menu of concept queries and create a new query, this opens the concept queries designer. For this example we will use a multi-select datafield to manipulate the concepts available in a multi-select. So in this case depending on the selected option in the multi select we expect to get the concepts back that have a relation with the selected concept.

Result

The last part is to add the ontology query to a interaction screen or implement it in an expression. Most common and easy way is to add to a multi select field. In the image below the query is added to the Month multi select, this is what is affected by the query.

You can also use concept queries in expressions, like this for example:

range of [MonthPerQuarter]
where concept in [OntologyQueries.MonthsSelectedQuarters]

This expression will generate a list of months that are associated with the selected quarters.

Examples

List of specific model type of cars.

A rental company wants a be able to filter their available cars list. They want to be able to filter on model type and be able to select the models that fit the earlier selected type. They are going to use multi-select fields to make the filter options. In the video below you see the the result we want to work towards.

  1. The concepts for the brands and its models are already made and a new concept for the type of model is added, this is the hierarchy we are going to use:

In the images you can see the ontology or the levels the concepts are added. The brand of a car and the model has a parent child relation because they are part of the same hierarchy. The type concept is in the cars level and does not have a relation with the model concepts (yet).

  1. The next step is making the filter fields. In this case we want a field to select the type and fields for the different brands to select the possible models for that brand.

  1. We have everything we need to start working on the relations now. First we want to create the relation type. This is the type of relation between the model type and the specific models. Go to the concept relation types folder in the concept and concept queries in the resource pane. Open the context menu and select new relation type. We look at this relation form the model type concept, this is what we use as starting point for the name. So in this case we will call the relation 'type of the models'. The reverse name is going to be 'Model of the Type'. The meaning of the relation changes depending on what you look at, so this relation is asymmetric.

  2. Open the Concept relation overview and add the relations between the model type and the models. In the image below you can see the first relations between the Hot Hatch type and the models is already added and the properties for the Coupe and its models is filled in the new relation form. Do this every model you want to be able to filter on.

  1. The next step is creating the concept query, for this you go to the concept queries in concepts and concept queries, and open the context menu to select new concept query. Give the query a fitting name and it will then open the concept query designer. The first thing we need to add is the search field, in this case add a multi select datafield and select the type multi select field. Add the unknown concept for the other side of the relation and select one of the brands. Last step is to draw the 'relation line' between the two nodes and select the right relation type, in this case type of the models. (In the multi select you choose the type of models that the concept should return.)

  1. Last step is making the interaction screen and adding the concept queries to the right fields. In the image you can see the result and below that the steps to create it.

  • Adaptive column to divide the page for a search filter and the list that is filtered.

  • Panel with the multi select filter options in the left cell and the datagrid in the right.

  • First multi select it the model types as filter options

  • A conditional, this is to show all options when the type doesn't have a selection, when a type is selected the condition goes to false and form in the bottom picture is shown.

  • The multi select for every brand of cars is added, this is the important part. On the right side of the image you can see the Ontology query field, in this form the query we made is added. Now the options that are shown are only those with a relation to the selected model type.

  • To finish it up a filter is added to the datagrid to only show cars that comply with the selected filter options.

For example:
(
if HasValue([Type])
	then [Type] contains [Cars.Type]
	else true
)
and
( 
if HasValue([Relations.Toyota])
	then [Relations.Toyota] contains [Cars.Model]
	else true
)

Alternatives Ways to use concept queries.

Cleaner Concept Query

In the concept query for the example we added an relation for every brand separately. For brand concept you need a new relation with the multi select datafield. There is also a ways to do this with one relation. When you select a level higher as unknown concept and select the depth to all descendants you get every concept back under brand. This way you can use one multi select in the interface and don't need to add every brand to the query separately. This will work best if you use the type options of concept to filter out the models from the brands, when using the all descendants options you also get the brand name as a concept back.

Relations in expressions

You can also use the concept query with relations in expressions, this gives you the ability to use it in filters or use it in labels. This label creates a list that returns the months in the a selected quarter.

range of [MonthPerQuarter]
where concept in [OntologyQueries.MonthsSelectedQuarters] 

Where can concept relations be useful

  • The short answer is everywhere where concepts are used. This article mostly showed it in use for filters.

  • It can also be used in giving user rolls specific rights which fit their access level, through using custom relations between the rights and access levels.

Inverse Name -*asymmetric - The name of the inverse type, when the relation inverses. Read more about what this means in the .

When the button is selected it is replaced by the new relation form, here you set up the relation Properties. The form looks like this:

A Concept Query is a Definition that will yield a collection of concepts. It can be used in Expressions as being a List of Concepts (similar to a Concept-Set or Multi-Select). Or it can be used as Source for Single/Multi Select Input fields, to present a specifically filtered list of options to choose from. The Concept Query contains of certain Nodes, Annotations/Indicators and Relations to form the Definition by which the Concepts are checked and collected to be presented as the result. If you don't know what concepts queries are or how they work we advice you to first read more about .

This means we need a multi-select datafield in the query (), andweI need to add the concept we want to manipulate as a unknown concept (The concept changes depending on the multi-select so unknown). Now we can use the relation by dragging a line from the multi-select to the the concept we want to manipulate and select the relation between them. In the case of the image below we want a set of months depending on what quarter is selected in the application. The relation is that a quarter holds specific months, so in this case we drag a line from quarters (the multi-select that sets the condition) to the concept of months and select right concept type. In this case 'Contains the months', a relation type made for this use-case. What is left before this query is ready is telling if the children of the concepts (months) to be included or excluded, in this case included.

etc.

concept queries
expandable above
here
Hierarchy of Models under Brand with Brand and Type under Cars
Concept relation type context menu
Creating a new Relation Type
Concept relations overview with a relations added.
New Relations Properties