Transcript:
So this lesson is variable date offsets. The difference here is we want to offset a date, but the form author doesn't know how much that offset is gonna be. It's gonna be determined depending upon responses from the form user.
So step one here is to type or copy paste this paragraph into a blank document. I'm gonna copy paste. I'm just selecting the text in my manual here, pressing control c to copy it, and pressing control control v to paste it into my document.
I don't like the extra hard return return in the middle there, so I'm gonna delete that and replace it with a space.
So there's the text we're working with. Then I need to click the questionnaire button and create to create my questionnaire at the bottom of the document.
And then I need to fill in the questionnaire as shown in the manual. In this case, we have two questions. The first one is labeled date, and the question is what is the lease commencement date?
And the second one, to create the second row in this questionnaire, all I need to do, like in any word table, is just tab out of the last cell. See how my cursor is flashing in the last cell there? When I press the tab key, that adds a new row underneath the row I was in. And I can type my second label term, and the question for that is how many years long is the term?
There's both the questions that I need. That's the end of step one.
Moving on to step two, I need to, add basic fields.
The first field I need is right here. The number of years is gonna be determined by the answer to this, term question.
So I need a field here. I'll select the number three and click the field button.
I'll select the term answer. That's the answer that I need to insert here in the document.
I'm gonna select the number field type because what's gonna be inserted here is a number. And the format that I want that number to appear in, I've got lots of choices. I just want a straightforward number here with no decimals, the default choice.
And then I click okay.
There's my term field. Now I need another basic field for this date. This is the beginning of the lease term. And looking down here, I can see that the commencement date is in the question labeled date.
So I'll put a field here. I click the field button, choose the date answer this time, make it a date format, and click okay.
Two basic fields. One pulls in the the term years and the other pulls in the date.
Next, we move to step three.
For this one, I'm selecting March eleventh twenty twenty.
This date needs a date offset. It's gonna the starting point is gonna be whatever is the commencement date, this value right here, but then we're gonna add some number of years. We don't really know how many years it's gonna be. It's gonna be however many years the form user answered for the term.
So to create that field, first, I select March eleventh twenty twenty, and I click field.
I select the date answer as our starting point. Whenever you're creating a date offset, you wanna choose some date as the starting point. In this case, we're gonna start with that commencement date.
I choose the date field type, and I click the offset button because I wanna offset that date by some amount.
That opens my date offset screen. In this case, our offset is gonna be some amount of years that we don't know as the form author. We don't know in advance how many years it's gonna be, so we have to click the variable tab. It's a variable offset.
In this case, we want to add, plus some number of years, so I've selected plus in the left box.
I'm gonna select the term answer as the number of years.
Advancing that many calendar days, I want to advance that many years.
So plus term years translated into, expanded English that says start with the supply date and add term years. That's whatever number of years is specified.
Yes, sir.
Years.
If the starting date is February twenty ninth and the ending date is not a leap year, it's gonna go to February twenty eighth. So that's good. If my starting date happened to be in a leap year and it was February twenty ninth, it would not make sense to get to, refer to the ending date as February twenty ninth that number of years later because that might not be a leap year. So it's it's just gonna make that adjustment for us going to the last day of February if necessary. To set it for the last day of whatever month, use the 31st.
So I've chosen my offset there. I click okay. I click okay again to create offset field, and that's it for step three.
And that's all the steps for this lesson. Now let's check out how it performs.
I'm gonna save this form. File, save as. I'm gonna save it as a Word template, and I'm gonna put it, on my desktop. I have a folder named lessons.
I'm gonna call this lesson two.
That form has been saved. I can try it out. Let's say that, for our example, the starting date, the least commencement date is eight six twenty seventeen, and the least term is gonna be five years.
When I click the fill button, I end up with five for the number of years, my starting date as specified, and then a date five years later. This is a variable offset because the number of years by which this date is offset is determined by that number there, which the form author author does not know in advance. It's determined by the form user. User. We have two questions.
One of them has a date response, and one of them has a numeric response. And you might wanna even reinforce that for your form users. Here in the question box, I might put in I'm gonna make a flush right, italic, and in a smaller font because I wanna distinguish this, this tip from the question itself. I can put in a tip for the form user here that says format, month slash day slash year.
That's gonna encourage the form user to type material there that that I want them to.
If they're wondering whether they should use a two digit or a four digit year, if they're wondering whether I expect them to put the month first or the date first, that's gonna reassure them and look at it typed correctly there. And similarly, here, if I wanna encourage them to type a number instead of perhaps, the word five or perhaps they might be inclined to type five years with the word years, and I really just want them to type a number all by itself. So I can put in a tip here that says, for example, colon n. So that makes it very clear to the form user that I want them to type a number into that answer.
Now that I can depend on there being a date here and a number here, I can make use of that to do some fancy things in my form. I'm gonna reset this.
Here, where I want a date to appear, let's delete this field that I already created so that I can create another field from scratch.
Click field.
I know I want the date up to appear here. If I leave it on text, then it's gonna take whatever they typed in the answer and put it there without any modification at all other than choosing whether it's, upper case, lower case, title case, first capital.
But it's not gonna do anything further to that answer.
If I choose number, it's gonna take whatever they typed in that answer, and it's gonna convert it to a number, and then it's gonna apply what what's to it.
So it can do some really fancy stuff. In fact, we'll do that with the, term years here in a moment since that is a number. In this case, though, if I choose the number format and the answer that they typed is a date, I'm gonna end up with an error. In fact, let's let's do that once just so you can see what it looks like. I'm gonna say I expect a number to be typed in response to my date question and click okay. That gives me even though it says date there, that's because the name of the label of my question is the word date.
But I said to treat that response as a number. That means when I click fill with a date in that answer, I end up with error, missing number. As a form author, if you see that message, that means, hold on. I'm trying to treat something here as a number, but it's not a number.
It's a date. So I've got my format wrong. I'm gonna hit reset and fix that.
Instead, I will treat it as a date, and that's gonna give me a good result because it is a date. Let's do the reverse over here. This, field is pulling from the term answer, which is gonna be a number.
But what happens if I treat that field as a date?
When I put when I fill that in, it says error, date format. That's telling me as the form author, hold on. Whatever is typed here in the answer cannot be interpreted as a date, so you better not treat it as a date.
Instead, hit reset.
Go back into your field and treat it as a number because it's a number. If I treat it as a number, it can be interpreted correctly, and it gives me this huge flexibility to display it in all sorts of different formats. For example, if it were a a dollar value, I might want to use a format like well, let's go with dollars and cents like that.
And when I click fill, same number. It's a five.
But instead of putting in the numeral five, it puts in some text, five dollars and no cents. So I have a huge amount of control. If I treat it as a number, then I get access to all the numeric formats. If I treat it as a date, I get access to all the date formats.
tags: number/dates, fields, term, beginning, ending, format, years, March 11, 2020, commencement, lease, variable, calendar, February 29, leap year, five, 5, tip, error, missing number