Short-hand for a lengthy condition

We recently received the following question from a user and wanted to share our answer with the rest of the ClauseBase Community:

Is there any short-hand syntax for when the same conditional syntax is going to be used 2 or more times in a row, not to have to repeat all of the “ifs” and to just state the conditional text using the same order?

For example: let’s say I have a lengthy condition like:

*“ {(#contract^value > 5000) OR (#contract^type = "licensing"): the CEO is the signatory} ”*

Is there any way to use short-hand for this condition so that I don’t have to repeat the entire thing each time I want to use it?

This is indeed possible. What you want to do is to create a data expression for this condition.

A data expression essentially allows you to create a separate kind of datafield that contains an entire condition within itself.

To create one, simply edit a concept and under the “data-expressions” submenu, choose the type of expression you are using. In the example above, that would be a text datafield or a currency datafield.

Then, under “contents”, copy and paste the condition and then under “internal name”, give you data expression a name (this is what you will write in your clause).

Take a look at the screenshot below or this Help Center article for more information.

image

Hi Senne, is there any difference between using a data-expression or a snippet?

Hi Bernd,

The primary difference is that data expressions are solely focused on simplifying the writing of complex conditions, whereas snippets can be used in a much broader sense (typically by also providing placeholders for static text, which data expressions don’t do).

External snippets are frequently used to house complex and frequently reoccurring conditions as well but they house the entire condition, whereas data expressions allow you to house the “left side” of the condition and give you the freedom to determine the “right side” as you see fit.

For example: I may have a snippet which determines my standard phrasing for the applicable law: {#applicable-law^name = "Dutch": Dutch law | = "US": US law | = "Belgian": Belgian law"}.

This is great for those frequently reoccurring mentions of the applicable law, but what if I want to use a part of that condition and deliver a different result in the right side? For example: {#applicable-law^name = "Dutch": the courts of Amsterdam}. In this case, a data expression for the part of the condition saying “{#applicable-law^name = Dutch:” would be better.