VB Scripting for Perceptive Content Application Plans
VB Scripting is an easy to use method for customizing Perceptive Content (ImageNow) Application Plans, giving you more flexibility in how you retrieve and interact with data from external applications. With very minimal coding knowledge, users can insert small snippets of VB Scripting to parse data, add basic conditional logic, or manipulate values to match expected formats in your workflow.
Watch RPI’s John Marney and Michael Madsen share some of our most commonly used VB Scripts that you can start using today in your Application Plans.
Transcript
John Marney:
Hello, everyone. And welcome to another RPI Consultants Webinar Wednesdays with Michael Madsen and John Marney. Oh, I just hit my microphone. Sorry, that was probably pretty loud.
Today our topic is VB scripting for Perceptive Content. This is a semi-technical webinar, and you’re going to see some code snippets. Those are all available to you after we’re done at request.
Coming up, later on in May, we have a two-day big webinars series for all of our Infor Lawson clients. That’s going to cover a huge variety of topics, but largely focused on a lot of information around the V11 Cloud suite, but really much more.
Next month for the CPA webinars, on June 5th in the morning we have a Webinar on system and database and maintenance best practices, which I believe the plan is right now that you will see a Michael Madsen redux on that one. And, later in the afternoon, accounts payable automation for invoice processing. That’s a mouthful.
Meet your speakers first. Myself, Manager of Solution Delivery here on the Content and Process Automation team. I have extensive experience around all of the ECM and OCR product offerings that we have, Perceptive, Kofax, and OnBase. And the majority of my experience comes from the healthcare back office, including accounts payable and human resources. I am a proud new father as of March 21st and yeah, thank you. Thank you. And I’m dealing with all of the great sleep that comes with that.
Michael Madsen:
Hello, I am Michael Madsen. I work mainly with accounts payable and human resource solutions with Perceptive products with commercial and higher education companies, most of the time. I’m the office dungeon master, and we’re hoping for a net 20 on this webinar.
John Marney:
Jumping right into our agenda, we’re going to avoid some critical failures. First, we’re going to tell you about RPI Consultants. Then we’re going to list the different types of Perceptive integrations, but really focusing in this webinar on just one, which is using VB script and Perceptive. We’re going to jump into a bunch of useful examples, at least we think they’re useful, and we hope you do too. And then, we’ll wrap up with questions and a summary.
Before we go any further, warning, again, this is semi-technical. So, if you are ever feeling like you’re in over your head, that’s all right, we can help you with that. Again, the example code that we’re using here and even more is available upon request. And we have to give the condition that implementing code is done at your own risk. So, anything you see here, make sure you know what you’re doing and do it in a test environment, because I know each and every one of you have a test environment set up. Side effects of poorly implemented code are infinite loops, machine crashes, data loss, and spontaneous black hole creation such as this. But that’s real.
All right, Mike, tell us about RPI.
Michael Madsen:
So, if you guys don’t know that much about RPI from all of our webinars, we are a consulting firm with over 80 full time consultants, project managers, and technical architects. We have offices all over the country, but mainly in Tampa, Baltimore, and Kansas City. We generally work with anything from health checks to implementations, new solution designs. Basically, if it deals with imaging software, we can help you out with it. The main platforms that we work with are Hyland products, Lawson, Brainware, OnBase, pretty much anything imaging related.
John Marney:
So, all that said, our topic today is integrating with Perceptive Content specifically. So, there’s four main types of ways that you can integrate with Perceptive Content. The first one, iScript, extremely ubiquitous across all Perceptive implementations. These are how you automate your workflow processes, integrate with outside systems, et cetera. On the client side, there’s an API, which is called the Com Object. We’re gonna touch on that briefly today. And then, there’s also the majority of what we’re talking about, VB Scripting, and finally Integration Server, or formerly, Message Agent.
Michael Madsen:
All right, so first, what is VB Scripting? A lot of you probably already know VB script is just Microsoft coding language that you can utilize within the operating system, and it helps you really extend some of the usefulness of your application plans and capture profiles.
John Marney:
Yep. Some quick basics for anybody who isn’t super familiar, scripting is a combination of different things. The first most basic type of scripting is using logic statements. If then, else, if then, and else. We’re basically defining what actions we want to take when certain conditions arise. So, then we have various ways to evaluate conditions. If X is less than two, return blue, else, return green, right? Finally, you have, a little more complex, you have loops. So, while X is less than five, return green, and then on each loop add one to X so that it will no longer be true after five loops.
Okay. That’s the 30 second version of what scripting is. So, I’m sure you’re all well-educated. So, let’s get started.
Michael Madsen:
All right. So, when we get into VB Scripting inside of something like an application plan, the nice thing about this is that we can utilize VB Script to help us move through whatever pain we’re looking at. So, instead of just doing a normal screen scrape where I’m using like whatever is displaying on the computer to find the exact node, I can actually use the trees inside of the page structure to find exactly where that value is. So, if we utilize that tree, then it helps us get that value every single time.
John Marney:
And it can be even simpler than that. Maybe it’s just straight data manipulation. Let’s say in your business application, you have a name that’s ordered last comma first, middle. And you want to reorder that name to be first, middle, last when it’s inside a Perceptive Content. A simple VB Script can be deployed inside the application plan to do that.
So, you can add the scripts to one or more dictionary items inside of the application plan. Use the working value variable. It’s global inside of application plans to return any information back to the current dictionary item. Or you can use the syntax of dictionary and then the name of the dictionary element to set other items from the same script.
Michael Madsen:
Another area we can use it as with capture profiles. One of the bigger differences that some of you may know already is that, if we’re using a capture profile, a capture profile will allow us to set like our index keys. But, if we need something a little bit more advanced where we’re actually setting custom properties along with those index keys, then we would use the application plan.
John Marney:
And so, the syntax here is, inside of your capture profile, you open up the index key, change it to a VB Script, and then you can set the value. You’d set the value using the name of the index key, drawer, folder, tab, field 4, etc. Here I’m setting field 1 equal to Barfolomew of Spaceballs fame. All right.
All right. The meat and potatoes, useful examples or how are we actually applying this? First, really handy, you can use the VB Script to link to Excel. So, you could build a normal application plan or Learn Mode to, let’s say, using Viewpoint, to fetch values out of an Excel spreadsheet. However, that’s going to be prone to failure or breaking. So, you can actually use a very simple VB Script to point directly to the X, Y coordinates or build even more logic around it to, if you find this value in one field, go find this other field. So, there’s some script here to allow you to link directly into Excel cells.
Michael Madsen:
So, with Internet Explorer scripting, a lot of the time what we do is kind of like what I was talking about with that tree. So, we can go into the page source code, look through the whole tree for every single node, find exactly what we’re looking for, and pull that back. And, if we set up our Internet Explorer scripting correctly, then whoever opens the page should be able to pull back the value. But we’ll see a little bit later on, or I guess in the next slide, how that can be a little bit of a challenge.
John Marney:
And with the Internet Explorer scripting specifically, you have some really good options to interact with data on the Internet Explorer page. For example, you’ll see in this example script they have this function IE Find Value. That allows you to find the position on the page of any given value. Here we’re looking for the label invoice number. Then you can use that as the anchor field to then go find other values. In this case we’re saying, we want to look for whatever is two spaces away from invoice number. Therefore, we’re hopefully finding the actual number and not just the label.
So, then we have AppGetData, which is extremely common in learn mode scripting.
Michael Madsen:
Yeah, so AppGetData, this is specifically referencing that tree that I’m talking about, so it utilizes ACC Explorer, which is just an executable that you can run from the machine that loads up that whole tree. It’s a little frustrating to use at first and can take a little while to get your handle on. But, at the same time, after you’ve done it a few times, it gets easier.
So, really all it is, is manually counting out every single line. So, I know that my tree starts here, so I’m going to set it with four. I go down six more items. I set the next item with a six after the pipe, and I just literally count it out all the way down until I hit the field that I want to pull the information from.
John Marney:
It’s really manual to set up. And anytime you have values that shift around on a page, they are prone to breaking, which forces us to create loops inside of this script that call the AppGetData function over, and over, and over trying to find the value that we want. After a while, this can cause the learn mode to really slow down. So, as of Perceptive 7.1.5 or later builds of 7.1.5 and 7.2.2, Hyland implemented the ability for us to use AppGetTree.
AppGetTree functions very similarly AppGetData in that it’s still using that Windows accessibility API to reach out to other pieces of software and fetch data. The difference here is that we can fetch the entire tree of information that exists inside of that piece of software, pull it back into Perceptive, and then run code to loop through it. It’s much faster instead of having to run AppGetData over, and over, and over. The downside is that the scripts are a bit more complex.
So, the use cases here, and we’re going to dive into a couple, but things like in Infor, and PeopleSoft, and JD Edwards, a lot of different applications, you would have something like a vendor name, or a student name, or something that shows up as a label instead of a text box. And that’s typically where we find applications for this.
So, we have code ready for integration with Lawson. We’ve built it a number of times to fetch that vendor name. We also have code prepared for the Ellucian Colleague for voucher ID and student profile, just as two examples. But we really have much more, and it can be a very effective way to really speed up your Learn Modes, if they’re slow right now.
Michael Madsen:
And we have the Get Screen Text. So, this is something that you would utilize with your terminal application, like your old green screen displays. If anybody has worked with Recognition Agent and Zonal Control there, it’s very similar. You’re just setting your X, Y values to try to always know exactly where the data is that you can capture it, even if the screen shifts slightly.
John Marney:
Yep. And so, for your terminal applications, this basically copies and pastes the text out of the window down into the learn mode script so that you can manipulate it however you want.
A really simple use case that may not have a ton of application but is just kind of a creative example of some things that you can do. You can actually fetch the machine name of what is actually currently running the learn mode. It might be useful for audit, if you want to know what machine that a learn mode was run on, or even troubleshooting, if you’re trying to troubleshoot differences between two different machines.
Michael Madsen:
With link to ImageNow, so a lot of people utilize linking with their actual ERP applications or something like that. But you can actually set it up to work with ImageNow. And some applications for that might be if you’re scanning in a whole bunch of documents that you’re wanting to append to a single document that already exists and is already indexed in ImageNow, then, if we set up that link to index with the same values, whenever the document is created in ImageNow, if the index values of the new document match the document that already exists in ImageNow exactly, instead of creating the new document, it just appends that page to the document. So, it’s an easy way for you to quickly get everything together.
John Marney:
The common use case for that is if you want to attach some email correspondence to an existing document to facilitate the workflow processing, you would open that document, use the ImageNow Printer to capture it into the system image. ImageNow Printer would leverage the VB Script to grab the index values of the already opened document, and therefore append it. You could also just create it as a related document and just link some of the keys so that it can be found easy. Maybe you want to store it as its own document.
Michael Madsen:
Yep. And that can also make your related view searches a lot more handy too, if you’re not using those.
John Marney:
So, this link, this script actually uses the ImageNow COM Object, which is the client-side API for ImageNow. And what I mean by that is, if you have the ImageNow Thick Client installed on a computer, other open applications or other scripts outside of ImageNow can leverage this API to interact with the client. The API can do pretty much anything that the client has functionality for. So, any button or piece of data that’s available in the client you can manipulate. So you can capture index, retrieve documents, all from outside of the client. So, you can programmatically interact with it.
It’s useful for building reverse linking functions. So, our normal application is to have the document open, have the data available on the business application, click the golden key in ImageNow, and it pulls the information over. But if I have a thick client installed for my business application, such as Lawson Smart Office, or Oracle EBS, or many others, I could actually build a button inside of those applications to push the data into ImageNow. I can even have it push the data into ImageNow, click the route forward button, open the next document, and return to me back to my host application, reducing the total number of clicks you need, which is great for your data entry books.
Michael Madsen:
Yeah, and it’s nice when you can keep them in one program.
John Marney:
So, there’s a million applications for how you could use the COM Object. That wasn’t really the subject of this particular webinar, but it’s something that can be used via the VB Scripts.
So, that is the majority of our topics. We’re going to go ahead and take questions. Before we do that, I just want to throw out that you have some more resources available. Again, if you want any of the codes surrounding this, just reach out to us. However, a lot of it is also available on the Hyland community, especially examples of how to apply AppGetData and AppGetTree. But, if you take a stab at it, you need some help, feel free to let us know.
So, if you need to submit any questions, or would like to, open the GotoWebinar panel. There’s a questions pane inside of there where you can type them in and submit.
Speaker 3:
All right, John and Mike, whoever wants to take it, we have our first question. We are testing Import Agent right now. Can scripts be used with Import Agent. And, if so, where are those configured?
John Marney:
That’s a great question. So, for anybody who doesn’t know, Import Agent can leverage application plans. The traditional import agent set up is just all configuration file, but this question is more pertaining these to application plans. I actually would not have known the answer to this, but I happened to find it while I was preparing this webinar material.
You cannot apply VB Scripts to Import Agent application plans. So, if you need to do that level of manipulation, really your only option is to either skip Import Agent altogether and just use an iScript, which is generally what I would recommend. Or go ahead and pull it into your system with Import Agent, and then run it through a script after inside of workflow. Either way, the answer is no.
Speaker 3:
Great. Thanks. We have a lot of questions flowing in. So, the next one would be, can you talk a little bit more about when you would use VB Script as opposed to perhaps an iScript?
John Marney:
Absolutely. Mike, you want to take a stab?
Michael Madsen:
Yeah, so iScript would be just for a larger application. So, if I wanted to do more than just find data, maybe I wanted to manipulate files like on the server or something like that, then I would fall back on an iScript. Or if I was doing complicated workflow routing or something like that. But, when it comes to VB Script, all we’re doing with the VB Script inside of the application plan is trying to find a value. We’re trying to manipulate data or massage data inside of the application plan. So, it just depends on how large of a project you’re wanting to apply that to.
Most of the time, if it’s anything dealing with workflow or like actual like solution-based where you’re planning on manipulating the document itself as it moves through your process, you’ll fall back on iScript. Otherwise, if you’re just capturing the document for indexing, application plans will generally work best.
John Marney:
Yeah, I mean, kind of rephrased another way, if you already have a manual touch point and you’re using application plans, the VB Scripts are just a way to enhance that.
Michael Madsen:
Mm-hmm (affirmative).
John Marney:
Whereas, if you’re already doing other system integrations on the back end, that’s really where iScripts come into play. Great question.
Speaker 3:
All right, great. Our next question is, if Window Walker doesn’t work with a new application, what method might work to capture additional metadata on Linkit and Perceptive?
John Marney:
So, there’s a few parts to that answer. Window Walker is meant, to the best of my recollection, specifically to integrate with Java-based applications. And so, if Window Walker doesn’t work, it may be that you’re not integrating with the right type of application, or it just may not be the right solution to begin with. The AppGetData and the AppGetTree functionality are really your kind of last resort when it comes to the ability to fetch information out of another application using the learn modes at all. If those can’t do it, you’re going to be pretty severely limited. You could try things like HyperLearn, but frankly HyperLearn is extremely complex and prone to breaking all by itself.
And so, our recommendation at that point would be to move to an entirely different indexing model, if the learn modes just really aren’t working out for you. So, let’s start utilizing E-forms to get data entry, and we can automate a lot more with that kind of thing.
Michael Madsen:
And sometimes with using like ACC Explorer, if we’re trying to map out the actual tree path, in the example that we gave, it’s very simple. We found the one that works and that’s just what we’re using. But, in reality, you have a bunch of different combinations that it could be because, depending on which workstation it is, or which user is running in that application plan, that value could shift a little bit. So, we have a bunch of if statements where we say, we’re checking this node. If it doesn’t exist there, check this node, check this node, and we just go through that list until we find it. So, it can get a little complicated.
John Marney:
That’s where the AppGetTree, that’s really much newer functionality, it’s a replacement really for the AppGetData, and many people don’t have it implemented yet.
Speaker 3:
All right. So, the next question is looking for a little bit of advice. They were trying to link with the IE method, but it was only retrieving button information from their host system and none of the actual field values. It looks like the application will only ever be run on IE and not Chrome.
John Marney:
Yeah. So, I’m sorry that you have to use IE at all, is my first answer. But ultimately, yes. That’s, again, a perfect use case for this. The ability to use a VB Script to actually go in and get that data, it’s pretty likely we could, even if the IE learn modes don’t show any of it right now. Yeah. So, AppGetData, AppGetTree.
Speaker 3:
So, that also answers our next question, which was just, does AppGetTree only work for Chrome. And the answer is no. Also works on IE.
John Marney:
Theoretically, it works for anything. So, as long as the application…so, it’s not even just browser-based applications. As long as the application itself supports the Windows accessibility API, then it supports the ability to script that info out of it.
One way that you can probably test that on your own is, if you enable, I can’t remember exactly what it is in Windows, but I think it’s the blind options where the computer reads things to you, that’s actually using the accessibility API. And, as you mouse over fields, if it identifies information in that field, that means that it’s in that tree, and we could probably get it.
Speaker 3:
All right. It looks like might be the last one. Again, if anyone else has any questions, feel free to use GoTo to submit it. But this one is sort of specific to a host system. Can you VB Script with AppGetTree within PeopleSoft financials for values that are shifting within PeopleSoft?
John Marney:
Absolutely. So, the official Hyland documentation says that AppGetTree was rolled out specifically for Ellucian Colleague, and that’s vast majority of the examples, and maybe all the examples, that you can find on their community portal. But we have built AppGetTree scripts with other applications including JD Edwards, which is extremely similar to PeopleSoft in that regard, and for Lawson and others. So, it’s definitely possible.
Speaker 3:
All right, next one. Can VB Scripts be used related to barcodes and with barcodes?
John Marney:
Yes. So, that’s going to be sort of similar to the…I’m going to back up to a slide, the capture profiles. So, that’s kind of a complex answer. But the simplest way to answer it is, here in your capture profile, you have the ability to add a VB Script to an index value. You can also add some code in here that can fetch barcode values too.
Speaker 3:
And, as a quick plug, John actually did a webinar last month on using barcodes with capture profile. So, feel free to check that out.
John Marney:
I guess we should have talked about this.
Speaker 3:
At RPIC.com/webinars. Next one. Can you briefly review when to use ImageNow COM Object in a typical use case?
John Marney:
So, the biggest one that we can really provide is what we’ve laid out here where, if you want to link back to ImageNow inside of a Learn Mode. That’s where I implement this in almost every solution that I roll out. In our accounts payable invoice processing, if I want to capture vendor communications onto an invoice to support its approval or processing, then I want to be able to fetch those index keys as I capture a document. That’s one of the best ways.
And then, the other one is if…I think the example we gave was reverse linking. So, if you have a business application that can interact with ImageNow you can use custom code inside that business application to manipulate ImageNow through the COM Object.
Speaker 3:
All right, John and Mike, I think that’s all the questions we have.
John Marney:
All right. Great questions everybody. Of course, as always, if you have any more you know where to find us. So, I think that’s it for today. Again, please join us for our Infor series later on this month, and then come back and visit us in June. Thank you.
Michael Madsen:
Thank you.
Want More Content?
Sign up and get access to all our new Knowledge Base content, including new and upcoming Webinars, Virtual User Groups, Product Demos, White Papers, & Case Studies.
Entire Knowledge Base
All Products, Solutions, & Professional Services
Contact Us to Get Started
Don’t Just Take Our Word for it!
See What Our Clients Have to Say
Denver Health
“RPI brought in senior people that our folks related to and were able to work with easily. Their folks have been approachable, they listen to us, and they have been responsive to our questions – and when we see things we want to do a little differently, they have listened and figured out how to make it happen. “
Keith Thompson
Director of ERP Applications
Atlanta Public Schools
“Prior to RPI, we were really struggling with our HR technology. They brought in expertise to provide solutions to business problems, thought leadership for our long term strategic planning, and they help us make sure we are implementing new initiatives in an order that doesn’t create problems in the future. RPI has been a God-send. “
Skye Duckett
Chief Human Resources Officer
Nuvance Health
“We knew our Accounts Payable processes were unsustainable for our planned growth and RPI Consultants offered a blueprint for automating our most time-intensive workflow – invoice processing.”
Miles McIvor
Accounting Systems Manager
San Diego State University
“Our favorite outcome of the solution is the automation, which enables us to provide better service to our customers. Also, our consultant, Michael Madsen, was knowledgeable, easy to work with, patient, dependable and flexible with his schedule.”
Catherine Love
Associate Human Resources Director
Bon Secours Health System
“RPI has more than just knowledge, their consultants are personable leaders who will drive more efficient solutions. They challenged us to think outside the box and to believe that we could design a best-practice solution with minimal ongoing costs.”
Joel Stafford
Director of Accounts Payable
Lippert Components
“We understood we required a robust, customized solution. RPI not only had the product expertise, they listened to our needs to make sure the project was a success.”
Chris Tozier
Director of Information Technology
Bassett Medical Center
“Overall the project went really well, I’m very pleased with the outcome. I don’t think having any other consulting team on the project would have been able to provide us as much knowledge as RPI has been able to. “
Sue Pokorny
Manager of HRIS & Compensation
MD National Capital Park & Planning Commission
“Working with Anne Bwogi [RPI Project Manager] is fun. She keeps us grounded and makes sure we are thoroughly engaged. We have a name for her – the Annetrack. The Annetrack is on schedule so you better get on board.”
Derek Morgan
ERP Business Analyst
Aspirus
“Our relationship with RPI is great, they are like an extension of the Aspirus team. When we have a question, we reach out to them and get answers right away. If we have a big project, we bounce it off them immediately to get their ideas and ask for their expertise.”
Jen Underwood
Director of Supply Chain Informatics and Systems
Our People are the Difference
And Our Culture is Our Greatest Asset
A lot of people say it, we really mean it. We recruit good people. People who are great at what they do and fun to work with. We look for diverse strengths and abilities, a passion for excellent client service, and an entrepreneurial drive to get the job done.
We also practice what we preach and use the industry’s leading software to help manage our projects, engage with our client project teams, and enable our team to stay connected and collaborate. This open, team-based approach gives each customer and project the cumulative value of our entire team’s knowledge and experience.
The RPI Consultants Blog
News, Announcements, Celebrations, & Upcoming Events
News & Announcements
Kofax Releases Kofax RPA 11.1: What’s New and Why it’s Important
Michael Hopkins2024-02-26T13:28:42+00:00November 24th, 2020|Blog, Kofax Intelligent Automation, Robotic Process Automation, Software & Community Updates|
3 Ways Healthcare Can Be Better, Even After COVID19
Michael Hopkins2024-02-26T13:52:27+00:00November 2nd, 2020|Blog, Software & Community Updates|
RPI Consultants Launches New Website, Features, User Experience
Michael Hopkins2024-02-26T08:29:31+00:00October 22nd, 2020|Blog, Press Releases|
Free Kofax Capture & Transformation Assessment
Michael Hopkins2024-02-26T13:35:14+00:00June 8th, 2020|Blog, Software & Community Updates|
Perceptive Content / ImageNow 7.1.5 End-of-Life Plan
Michael Hopkins2024-02-26T13:33:40+00:00June 5th, 2020|Blog, Software & Community Updates|