Basic clause author tutorial

5. Conditional logic (III)

Let's take another final look at how different kinds of datafields can help you to create different kinds of conditions. The clause that we'll be tackling now is the non-compete clause. You can see that the template author has already indicated that the entire clause needs to be made optional. So whereas previously we had only made certain words or sentences or paragraphs optional we're now doing this for the entire clause, which of course adds a layer of complexity.  

Create a new clause

We’ll start the way that we always start by creating a new library clause. We’re creating the non-complete clause here so the boilerplate folder should be fine for that. Create a new file name called non-compete and then of course I can import the content title and content body, directly from my import menu in the global panel. Scroll all the way down and as you can see the indentation for these sub clauses in the compared to the main title of the clause here is perfectly fine. The only thing that we really need to do in order to import this clause is to indicate that the comment by the template author should be disabled, as we’ve done quite a few times already now.  

Then just click the import button, we can then also close the global panel and as you can see the content title has correctly been imported. We only need to remove these square brackets and the content body has also been imported. The only thing we need to clean up here is to indicate that this placeholder is not a concept, so as soon as we click save and insert you can see that the clause has been created. Now it’s just a matter of creating a condition that applies to both of these paragraphs. 

Enabled Condition

Let’s say that we were creating a true or false type datafield, let’s say we’re creating a condition with the true or false datafields. Obviously, we’re going to be looking at a different type of datafields but purely as an example we would probably write something along these lines. Let’s say that the question that we’re trying to ask with the datafield: is the non-compete clause applicable, yes or no? Then we could write non-compete applicable equals true colon and then close off this condition at the end of the second paragraph. 

Now unfortunately, things don’t work like that. You can not stretch a condition over multiple paragraphs in this way, but the good news is that there is a specific field that you can use especially for this kind of operation. With these field, you’re enabling or disabling an entire clause with one condition or with a combination of multiple conditions. We’ve already looked at file names, content title and content body. Those are the only three menus in the clause editor that we’ve actually looked at. 

We’re also going to be looking at this enabled menu, and this enabled menu allows you to do one very basic thing. It allows you to create a condition that essentially enables or disables an entire clause. Perfect for what we’re trying to achieve here, since this field will always contain a condition by definition, it should be a condition that is that is included here.  You don’t even need to write the curly brackets so you can suffice with, for example writing non-compete applicable equals true. That would be a valid condition.  

We won’t create this concept and create this datafield, we won’t go through that entire process because as I stated earlier, we’re trying to create a new type of condition. One that we haven’t really looked at before. 

  • We’ve looked at true or false type of conditions
  • We’ve looked at text datafield-based conditions
  • Now we’re going to take a look at list of text datafield-based conditions, where essentially the datafield type that we’re using is of course the list of text datafields. 

Conditionality

I’ll start by creating the actual condition and then we’ll do a quick analysis of what the structure of that condition is. 

  1. The Question: Let’s first of all say that the question that we’re trying to ask with this datafield, that’s of course always the starting point, is: “which optional clauses are made available in the document”? Which optional clauses do you want to activate in this document? Let’s say that that is the question since we’re going to be creating a list of sorts you know.
  2. The Answer: We need to be able to answer multiple things, multiple different answers to that question. Let’s say that in this particular case, one of those answers should be non-compete. If we know that that is the question, we know that our datafield is going to be for example agreement optional clauses.If we were using a text datafield, we might write something like this. But since a list of text datafields is essentially a collection of multiple different values, we can’t write it like this because this would imply that the entire collection is just this value and that’s just not true. There can be multiple different values in the entire collection. 
  3. The Result: So the way that you write a condition for a list of text datafields or rather for a condition based on a list of text datafields is as follows: non-compete in agreement optional clauses, so essentially what we’re saying here is the value non-compete should be included in the list of values, which we will include in the agreement optional clauses datafield.  

Of course, if we then create this datafield, we’re not creating a text datafield, we’re not creating a true or false datafield, we are creating this list of text datafields. Watch what happens as soon as we click save in library. As you can see this clause has now been struck through in red which means that it has been disabled. That’s of course because we haven’t provided the non-compete answer to the question which optional clauses are included in the agreement.  Which is essentially the question that we’re asking with this datafield. 

If we select this clause and go to the datafields menu you can actually see the reason why this clause has been disabled, you can see that there’s this popup where you can essentially ask why is this clause disabled and then ClauseBase will say that the datafields agreement optional clauses must contain the value non-compete. If we were to fill this datafield out, you can see that the clause is now no longer struck through in red and that it has been enabled instead of disabled. If it is in its disabled state, let’s say that we remove this again, if it isn’t in this disabled state, you can see it is structured in red. That is solely to assist you as the user by informing you that there is a clause present here, it just hasn’t been enabled yet. 

If you export this document now, this clause will not show up in the export. If there were an article 5 below this article 4, upon export that article would be made into article 4 because of course article 4 being non-compete is simply not present in this agreement. Then there’s one thing of course that we can do that we also did for the text datafields which is to create a predefined. That will allow us or at least other users to more accurately engage with this datafield and with this clause, so in order to add a predefined, we simply navigate into the concept where we created the datafield. Here we click the agreement hyperlink at the bottom of the screen. 

  • Create a predefined: We go to the datafields menu, we select the optional clauses datafields and there we can add this predefined called non-compete. And if we then save this in the library, you can see that we have now been granted an option to fill out the non-compete value for this datafield. And that essentially wraps up how you create this kind of a condition. 

Create datafields

Before we fully close off this clause though, it is important to remember that we need to do a few more things to fully automate this clause. Which is to create two datafields here. Now we’ve already created a duration type of datafield, which was the agreements duration. But of course we’re dealing with a different question here, we’re not dealing with the duration of the agreement, we’re dealing with the duration of the non-compete obligation. Sometimes the two might be the same but in many other cases the two will be something different.   

So while you might be tempted to write #agreementduration here, in reality you’re asking a different kind of question, you’re not asking the agreements duration, you’re asking the non-compete obligations duration. So ideally we write this type of datafield here, so we’ll quickly create this new concept. We’re not using it as a term so we don’t need to immediately include a concept label. And then of course we’ll turn that into a duration type of datafields. 

Then finally, this datafield might be a little bit tricky to name, like you know since the placeholder essentially says amount, it might be tempting to write non-compete amount. But that doesn’t really tell us much of anything. Instead we should take a look at the context for where this this datafield is included in and then we can see that in the event of a breach of this article, certain damages need to be paid. So instead of amount we could name this datafield damages for breach, for example since that makes a little bit more sense.  

Then if we select a type of datafield, that we’ll be creating for this for the particular datafield, you may also be tempted to say that this should be a number datafield. But the correct type of datafield is the currency datafield, because as you can see here, if we quickly create this datafield. A currency datafield allows us to fill out both a number and a currency of which type of sum of money essentially, this this refers to. So we could fill out something like five euros or five US dollars or five British pound. 

That’s what a currency datafield allows you to do and again it’s important to always choose the right type of datafield because that also allows you to do all sorts of mathematical equations, as we looked at in a previous chapter. 

But other than that those are the only real tricky bits in this particular clause, so as soon as we have saved this we are ready to move on to our next clause.  

Do you want to learn more about this chapter? Check out our help page on list of text datafields and enabled condition.