4. Basic Lists and Sublists, with Fields and Conditions
Basic Training
Learning Time: 12 minutes
This video will take you through the step by step process of building simple combinations of Lists and Sublists with embedded and related Fields and Conditions. This is the beginning of a truly intelligent form.
Transcript:
I'm gonna start off with, talking about series type answers and using both fields and lists with them. Let's just make a questionnaire here in this document with a single question asking for, your states list, the states where you have lived.
Just wanted to get some series type answer here. To make it a series type answer, I'll click the smart answer button, choose series of text boxes. That's what I mean when I say a series type answer. Sometimes you'll have a series of text boxes.
Sometimes you'll have a series of drop downs and check back box answers even though the word series doesn't appear here. Those are actually considered series type answers also because you've got a series of check boxes, some of which will be checked. But for this one, we're just going with a plain old text series.
I'll click okay.
And that will give the let's add a few more here. That will give the form user a chance to type several answers into a single box here. So perhaps this person has lived in Utah, in Wyoming, in Alabama, in Washington, and Rhode Island.
Then what I wanted to talk about is fields and lists. I'm just gonna bring the questionnaire up on the same page so we can see everything at once.
And I think people are accustomed to the idea that when you're dealing with a series type answer, you generally use a list within your document to get at that information. So it might say, I have lived in and here, I'll click the list button, choose the answer from which I want to draw my list, click the insert list button, and then choose how I want that information to be arranged. In this case, I want it all to just flow within the paragraph.
So I'm just gonna use comma separators there and list the items one after another.
That'll get me my list of states.
And when I click the fill button to try it out, I get all five states listed there in a series.
What's, not as obvious is that you can also use fields related to a series type answer. And sometimes people get into this by accident. They're, so accustomed to using fields as they're creating their form that when it comes time to list all these states, they might, just by force of habit, they might type I have lived in, and then instead of clicking the list button, they click the field button just because it's become kind of a habit for them. And they'll choose your state's insert field, and then they get something confusing here because they don't have their usual choices here for what sort of a list they wanna create.
That's because they're creating a field at the moment, not a list. So the first thing to be aware of is if you really intended to create a list, once you get to this point and you start wondering why your usual choices are not there, it's because you've accidentally clicked field instead of list. So in that case, just close out of the screen, delete that field that you created, and create a list instead.
The second thing to point out, though, is that sometimes that really is what you wanna do. There's a whole lot of information available from this answer apart from what can be extracted with a standard old list here.
For instance, I have lived in this many states right here.
I can put in a field, not a list, a field that will tell me all of, the count of all of the items in this series. So I click field, choose the series I'm talking about, your states, insert field, and I can choose count here to give me a count of those items. And I can choose the format for it here if I want words instead of numbers.
I'll choose that.
And now when I fill in my form, not only is it picking out all of these names of states for me, but it's also doing a little calculation for me and coming up with a number, which is a number that was not typed by the form user. It's a number that the program has generated itself.
I can do even trickier things here. I can say this many many, of them started with a w.
Oops.
Period.
And right here, I can put in a field field or the your state's answer. And instead of counting up all the items in the list, which is the default choice here, I can say, no. I just wanna count up some of them. I'll go with a sublist here, and I'll choose only the ones where the your state's word, the name of the state, starts with a w, upper lowercase do not matter. You can go either way there. And let's make that, also a word, but this time, let's, put a capital capitalize the first letter of it.
And click done.
Fill that in, and we're getting another piece of information about this list that's calculated by the program in the background.
Look at this here. We have state or states.
What if the person has only lived in one state? I'm just gonna remove some of these answers.
If they've only lived in Utah and I fill in this form, then I end up saying I have lived in one state. That doesn't sound any good. And them, zero of them started with w.
Couple of things I'm gonna change here. One is I'm gonna make this s optional. Let me reset my form.
So in instead of the, letter s here, I'm gonna put in a field.
The field is going to, be based on the your state's answer again, insert field.
And instead of being account type field, it's gonna be a singular plural type field. One of my choices in the singular plurals, if you go down about, six items or so, is the optional s. It shows s when the pronoun is plural. That's exactly what I need here. And I'll make it lowercase.
Done.
And now when I fill it in, that s is going to disappear when there's only one state listed.
But if there's two states and I fill, then that optional s is gonna pop in there when it's needed.
This field is going to also be a singular plural field, but it's gonna be based on just a portion of the list, not on the entire list. Let's reset this, and I'm gonna show you a shortcut here. I could create this field from scratch. Actually, I'll do it both ways. I'll do it the long way, and then I'll do it show you a shortcut to do it the short way. The long way to create this field would be to create field, choose your states.
It's gonna be a sublist of states that I'm considering. Remember, these are only the ones that start with w, and the subway sublist is gonna be only the ones that start with w, and then, singular, plural type field.
And instead of, being that optional s I chose before, I want it to be them what what did I say? Of them or one of them started with a w. One of them.
I guess I want I don't want a pronoun field here. I want a completely different condition if I only have one item.
I'm looking at it again. If there's only one state, instead of saying one of them started with a w, I'd like to say it started with a w. So two entirely different phrases depending on whether there's one or not. In that case, I can't do it with a pronoun field. I have to do it with two conditions.
So in one case, it's gonna say one of them started with a double. I'm sorry.
In one case, it's gonna say two, three, or four of them started with a w. So I select number of them, add a condition, and that condition is going to be if the your state's answer contains more than one item, then I want it to say that many of them.
Done.
Or yes. Let me zoom in even further here.
The word it here I want to appear if the number of states listed is exactly one. So I say condition, your states contains exactly one item. Two different phrases.
Here's the first one that will appear if there's more than one item. Here's the second one that will appear if there's exactly one item. Let's try that out. If I have two states and I fill, one of them started with a w. I've done something wrong here.
Let's see what happens if I do one state.
Remove that.
Fill, it started with a w.
I'm gonna reset. Oh, oh, I think I've got that.
It's because one of them did start with a w.
Wyoming and Alabama.
I think the form is correct, but I was wrong when I was reading it. So I have two states, and I fill it in.
One of them started with a w. That is correct. I wanted to say one of them, because there are two states among which to choose.
If more than one of them starts with a w, I need to add another state here, and let's go with Wisconsin.
So two of them started with a w. Okay. So the form is correct. I was thinking of it wrong. I have lived in three states. That's the total of all the states. Notice that the s gets added automatically.
Two of them, it's doing a calculation and an examination of the list to come up with a number here, and it's also got a condition that's not visible at the moment that's giving me some different language here depending on the configuration of answers. So that's a whole lot of information that's being extracted from a single series type answer.
But keep in mind that not only you can you list the items in a series type answer, but you can also extract all kinds of information about those answers with various types of fields and conditions based on the same answer.
tags: versus, contrast, explain, compare