Basic clause author tutorial

5. Conditional logic (II)

In the previous chapter we already looked at creating a basic condition using a true or false type datafield. In this next chapter we're going to be creating a different kind of condition based on a different kind of datafield. That's going to be the text datafield, because the true or false datafield gives us two options yes or no, but the text datafields gives us the freedom to define our own options and also choose how many there are. Which can result in quite a few interesting permutations of any given clause.

 So before we launch into that let’s first take a quick final look at the clause that we automated previously. Create the necessary datafields for the clause if you didn’t get around to that yet, you can now copy all of this content. Just know that all of these datafields, except of course for this one which is a true or false datafield, are text datafields. The birth date datafield is of course a date type datafield.  

Create a new clause

So moving on, the clause which we are going to automate is going to be the applicable law clause. As you can see in the source documents there are two placeholders here one for the jurisdiction of the applicable law and one for the location of the competent court.  

Now you may or nearly be tempted to just create two datafields there but the template author has created quite a list of instructions for how this clause should be filled out. So we don’t have the freedom to just fill out any value that we like. We should in fact only be able to choose between three different options. That’s going to be France, Germany and Belgium, depending on which option is chosen here a different location of the competent court should be portrayed in article 9.2. So if France is selected then we choose Paris, Germany selected then we choose Berlin and if Belgium is selected then we choose Brussels. 

Let’s get right to it, we’ll start by creating a new library clause. We’re dealing with the applicable law and competent court clause. The boilerplate folder seems like a good location to place that clause in, again important parts are the file name, content title and content body.

  • For file name, we’ll choose applicable law and competent court.
  • For the content title and content body, copy this from the Word documents or use the import mode.

I’ll open up the global panel, scroll all the way down and as you can see much like in our previous clause there are still a few comments that were left by the template author embedded into this imported document. Of course we don’t want to import to these rather to the content body fields. What we’ll do is, we’ll disable them by double clicking the circle icon next to these paragraphs.

And then there are two options also as previously discussed. We can either select all of the text and click transfer selection, what we can also do is click the import icon next to the title of the clause and that’s going to import all of the subclauses for this clause. If we do that here watch what happens, the content title is imported as it should be.  

The content body however only features one paragraph and the reason for that is that you can see 9.1 it’s clearly a subclause of article 9. It’s indented one level to the right but if we scroll down to 9.2 we can see that it is actually still all the way to the to the left, so it’s not registered as a sub-clause. We can change that by just moving all of these paragraphs one level to the right using these arrow icons. If we now try that again, now you can see what 9.1 is, it’s indented under the article 9. Same for 9.2, if we now try to import it again then you can see that the necessary content is imported, so we can close the global panel and continue working on our clause. 

Add predefines

As you remember the instructions that were handed to us by the template author, said that we should create predefined options, so not just any value that can be filled out, but predefined options. Of course first we need to start by creating a datafield, and in this case I’ll choose applicable law jurisdiction. You could have also chosen something like agreement, there’s very few wrong answers so to speak.  

Create concept: Obviously, we haven’t created this concept yet. So we’ll create a new concept, stored in our concepts folder, we don’t really need to include a concept label. Because we’re not going to use this concept as a term, so we’re only going to use it as a storage container for datafields

Create datafield: Then of course the datafield in question, as mentioned in the introduction to this chapter, is going to be a text type datafield.

Now if I save this in the library, you will see that we can fill out this datafield as we choose. No predefined options have been created yet, in order to do that you can click this reference to the concept applicable law. In this sort of hyperlink format at the bottom of the screen, which will open that concept up in edit mode. Then if we go to the datafields menu, we have an overview of all the datafields attached to this concept and a bunch of different options that we can add to this datafield. The one that we need is of course the predefined option, that will allow us to provide predefined answers. As soon as we click that you can see we have one predefined area but we can create two more. The predefines that the template author asked us to create are: Belgium, France and Germany. 

Now if you are planning to use ClauseBase in different languages and even if you’re not planning to use it in in different languages, but you want to continue using this clause in multiple different settings for example.

This approach while it works, may have some problems going forward to make it future proof. So in the description we’ve included some information on how to probably better approach this issue but for now this will definitely suffice.

For now we’ve created three predefines that we’re going to be able to fill out here. We can also indicate that only the predefined values can be stored, so that no free values can be filled out. Which is of course exactly what the template author asked us to do. If we now click save in library we can close this concept and watch what happens if we now save this clause as well in order to update it with the new information that we included in the concept. You can see that the free text bar, that allowed us to fill out a free value, has disappeared. Instead we only have the option to select either Belgium, France or Germany. 

Conditionality

With that information ready, we can now proceed to the condition that we’re going to be creating here in article 9.2 or 3.2, as it is shown currently in this document. 

Again the structure of a datafield or of a condition rather is one of three parts, so we’ll always start by writing our curly brackets.

  • The Question: Then within those curly brackets we’ll always start by first implicitly asking a question. In this case of course the question is the one that we just created, which is the jurisdiction of the applicable law. So we’ll use applicable law jurisdiction.
  • The Answer: And then we can proceed to the second part of the condition, which is the part where we fill out a hypothetical answer to that question. For a text type datafield that takes the form of equals, much as it would have been for a true or false type datafield, but then between parentheses. The text that is going to be filled out here, so in our case Belgium.
  • The Result: Then we can move on to the third part of the condition by inserting a colon and then we include for example the word Brussels. 

If you need more information on the different kinds of notations when you’re using different kinds of datafields, the grammar sheet (https://help.clausebase.com/kb/grammar-sheet/) has an interesting overview of that. 

Then of course we’ve only defined one of our three options. We can again bifurcate this condition to provide a different hypothetical answer to the question “what is the jurisdiction”? In that case it will be equals France colon Paris, and one final option equals Germany, colon Berlin. If we now save this you can see that a purple bar appears next to the clause which indicates of course the presence of conditional logic. If we now choose one of these predefines, for example Belgium, you can see that the clause says this agreement is subject to the law of Belgium and the courts at Brussels shall be exclusively competent. We can go to the datafields menu and play around with this some more.  

So that sums up the creation of a condition using a text type datafield.

⏭ Next on we’ll take one final look at another different type of condition using another different type of datafield. 

Do you want to learn more about this chapter? Check out our help page on examples of conditions.