Learn how to use additional search elements (such as barcodes, dates, etc.) using relations within FlexiLayout Studio.
Well, hello. Today we're going to continue learning FlexiLayout Studio for ABBYY Flexicapture. Now FlexiLayouts, just to remind you is a way that we can get semi-structured data or data that has some sort of textual relationship instead of location. What we've done in the past is we've located some elements based on some obvious things, like keywords for example. Your planet name in this case, or your space ship number in this case. We use what we call label fields to find it. We have a label and we have a field and that's what we want to capture.
Today we're going to look at some other advanced elements that we can use. An example would be maybe a bar code, or maybe some dates and etcetera. We're gonna learn that today. We're gonna learn about a little bit about relationships and how we can use the information that we find on the form or different text on the form to help us determine a relationship that will help us find other text on the form.
Let's start out today by looking for this bar code. There's a bar code if we look at each one of these. There's a bar code on this form. This one will be a very simple one. Let's go ahead and add a bar code field. Remember we always do a search element and then whatever we return in blocks, these blocks is what gets returned to the FlexiCapture product so that we can capture these on documents as we process them.
We're gonna create an element and this one's gonna be pretty obvious here. We're going to have what we call a bar code element. On the bar code element, we have a lot of different feature that we can reference. You can see we can control what kind of bar codes, how they orient. Again, once, again how they relate to each other and other elements on the form. In this case, we're gonna be happy that we have a bar code.
We're gonna have a bar code. There is just one bar code on every one of the samples, which is fine. In this case we're just gonna tell the software to look for a bar code. We're gonna tell it where its source is. Remember every block relates to a search element source. We're gonna tell the software this is a bar code. We'll go ahead and match these documents here.
Now, that we have that you can see, now we have our returning in green, which means we found it. We are returning that block, which is the bar code. I'm gonna intelligently name this one here. Instead of block, we'll maybe call this our bar code. Then if we see here, we can match and we'll see that all of our bar codes are found here.
Now that we found bar code, let's look for something like name here. Name is an interesting field because if we just tell the software to look for the word name, colon, it will obviously find things like this field, which is exactly what we do not want to happen. However, if we look at every one of these, we can tell the software to use what we call a relationship. Now, there are multiple ways to find elements on a form. Every developer is gonna do it little bit differently, but today we're going to target using relationships on how we do this. Other developers might use what we call a first found field. In this case, we're going to simply look for anything that has the word name in it, but it has to be above your planet name.
In this case, we're going to say we want to find a labeled field. And in this case, we'll say look for anything that has the name, name, colon. If we stopped there, you would definitely have problems in relationship your planet name. In fact, let's go ahead and stop there. We'll just add it a block, so it's obvious to see. Let's give it an intelligent name here, just so we can make sure we understand the difference. I should've been a little bit more disciplined. We should call this a really good name here. We'll call it a labeled field. Little bit more intelligently.
When we search for these, the software will sometimes find it correctly, and sometimes not. In this case, we did fine on most of these but you can see here we did not find name, colon. That's just to speak to some of the differences in what we call our hypotheses here. However, it did find name, colon, but you'll see in this case ... This one's fine. In this case here, maybe you can see we're getting confused here with the planet name.
If we can put a relationship on here that says anytime you find name, colon for the guest name, we don't want to talk about planet name. But we realize that the guest name must always be above your planet name. So what we're going to do is we're gonna say go look for your planet name. Go look for that field and make sure that when we find the guest name that it's always above it. You can see we can play around with some offsets, which is very common. We typically need to do that when we're developing more complex forms, but in this case we'll go ahead and let the software run.
Now that we've set up that relationship or that relation, you can see here it's very obvious that we're determining where the guest name is located. There's no confusion on this name field with this name field.
To just show you again how that would work, let's assume that we need to grab the date field here. It's very obvious, there's a date field and we can see that in most of these, it's between space ship number and this bar code. Once again, we'll just take a peek. There's space ship number and the bar code. We'll just take another peek here. There's space ship number and the bar code and that date is always in between there.
What we're gonna tell the software is to look for a date. We have this date element. We can say we'll give it a smart name. Maybe like date arrival. Of course, it's a date. We can tell it what format we want it to be in. We could get very specific based on your requirements. We want to tell it a relationship. Now, in this case remember that it's always below the space shop number field. We're gonna look for the space ship number field. We're gonna say it must be below it. And it must be above the bar code. We're just gonna look for the bar code and say that it must always be above it. In other words, it's gonna be between the bar code and the space ship number vertically on this form.
We're gonna hit Okay, and now we're gonna add our search block here. In this case, we'll just consider it text. Remember we always gotta give it a source. What we'll do here is go ahead and match these documents. Now that I've matched these documents if we give this an intelligent name again, so that we can easily see it ... Can't have a space in there.
Now that we've given it an intelligent name you can see we're gonna capture it because we told the software it's in the relationship of below a field and above a field. If we look at the arrival date there, it's found.
These relationships that you have are specific to every form that you have. The rules are kind of up to you in how you develop it and you have a lot of flexibility using elements. Like I said, every developer's going to do it differently. I would challenge you to look at some of these fields at a deeper level. Even read some documentation to learn about how you can find different data. You have different types, currencies, phones, dates, you can even look for separators, so if we wanted to capture this picture over here on the documents we can tell it to look for certain bars around the image so that we can capture the actual image itself.
A lot of different freedom that we have here as developers to customize our form and how we capture different fields off of it. There was a couple where we found the bar code. We also found the guest name and the arrival date there. Remember the way that we did that is through these relations and we have a lot of flexibility in the way that we control that. Every form is gonna be different, just understand that, but make sure you play around with it. Get comfortable with it, there's a lot of different technology features in here that you can use to your advantage, and to make life a little bit easier from a development perspective.
I hope you enjoyed this video. Definitely, jump in and learn about these different types of elements that we can capture. If you have any questions, please reach out to us. We would love to be of assistance to you. Thank you so much.