Question


VA
US
Last activity: 13 May 2025 16:22 EDT
Automation help PDF-Excel
So I've been trying to automate PDF data to populate in Excel and for the most par tit works but this one field REFUSES to cooperate. I got it to work on an older form but the current one keeps populating this error . Any thoughts???
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!


Pegasystems Inc.
US
@JahriC17390650I can't really tell what might be happening just from your screenshot. I think the best approach is to open a support request as they can see the entire problem (your files, your machine. etc.). If you do open a support request, please post the INC number for tracking. If you cannot open a support request for some reason, attaching a log might help if you cannot attach the PDF (please ensure no non-public information is posted here).
Updated: 9 May 2025 12:40 EDT


VA
US
@ThomasSasnett Thanks for you response. I ended up creating a work around for excel. While I have you, do you know if there is a way to have pega extract data from a template PDF connector. Essentially the form fields are the same but the data is always changing and I would prefer that the user uploads the pdf via dialog box and pega uses a connector that I've already defined variables for to extract that data.


Pegasystems Inc.
US
@JahriC17390650 Certainly. First, add a PDF Connector Component to your Globals. Next, you define a Document Type in the Connector. Here is where you can work with the PDF. It will automatically detect form fields but can work with them if you have OCR Essentials installed (which you should do anyway if you are working with PDFs). In the document type, you first identify the field, label, text, etc. that defines the document. How do you know it is this document type you are working with (in other words)? Once you have identified the document type, you may then add any form fields or any other areas you wish to read. These will show up as properties of the Connector once you save your changes. These properties are available within your automation to use as needed.


Pegasystems Inc.
US
@JahriC17390650If you can have a sample document without real data that can be attached, I can create an example for you.


VA
US
@ThomasSasnett Sure thing I've gone ahead and filled it with dummy data


Pegasystems Inc.
US
@JahriC17390650 Here is an example. I only defined the first four fields, but you can add the remaining ones from the connector if you wish (or whichever ones you need). I can attach screenshots too if that is helpful.


VA
US
@ThomasSasnett Yes Screenshots would definitely be helpful just so I'm understanding this properly. I tried running the automation and it asked for a path but I'm hoping to create a dialog box for the users to locate the file because I don't trust they'll know what to do with a prompt for a path. Thank You for this though the automation you have is clean.


Pegasystems Inc.
US
@JahriC17390650Here is an example with a UI to allow a user to select. I believe I will need to do another reply to attach screenshots. That will come momentarily.


Pegasystems Inc.
US


VA
US
@ThomasSasnettThank you for this. You've given me some pretty interesting tips. The issue I come across though is that the pdf connector is still reading data from the modified document. So even though I am able to use the dialog to click another document the data doesn't change dynamically. I know one work around to this would be to ask users to copy and name files a specific name in a specific folder but was hoping that the automation could pull those fields from other documents.


Pegasystems Inc.
US
@JahriC17390650 I do not understand. Are you using the connector on a document that is being edited? If so, then I would expect it to read what is in the document. In that case, the solution would be to make a copy of the document that you open with the connector. At that point, you'd control it, and it wouldn't change. Would that resolve your issue?


VA
US
@ThomasSasnett Sorry I'll try to explain it better. So far anytime I've used the PDF connector it only pulls data from the pdf its path is attached to. I am not able to use it as a template to grab the same fields from another PDF document that contains those same fields but with different data.


Pegasystems Inc.
US
@JahriC17390650 I believe all you need to do is call the close method when you are done with the file. When you need to read another, set the FileName property to the new file and call Open to connect to the new file.


VA
US
@ThomasSasnett Thanks Thomas, last question. When I am fully satisfied with an automation in robot studio and I deploy it and it saves as a pega file. How do I run it?


Pegasystems Inc.
US
@JahriC17390650 If you deploy to Pega Robot Manager, then you would assign that project to a user (or their DIV/ORG/Unit hierarchy) or workgroup and then configure the machine with Runtime installed to connect to Robot Manager. It would then find the assignment and load that package for the user. If you are not using Pega Robot Manager, then you can place that file either on the machine or on a common network area that each user has access to and configure Runtime to load that package at startup. You can configure it either by modifying the StartupProject node in the PegaRuntimeConfig.xml or by modifying the shortcut to runtime to use the arguments shown at the link below.
https://support.pega.com/question/how-run-deployed-package-local-desktop-using-pega-runtime-221


VA
US
@ThomasSasnett What if I only have access to robot studio and runtime? I tried putting the path to the project in the runtimecinfig xml like
" <StartupProject> C:\Users\VHALITCofieJ\OneDrive - Department of Veterans Affairs\Documents\pega\Test.pega</StartupProject>"
but nothing happens.


Pegasystems Inc.
US
If you've installed Runtime, then on your desktop or in your Start Menu will be a shortcut to Runtime. Once you have the path to your deployment package in your PegaRuntimeConfig.xml under the StartupProject node, then launching runtime will load that package. This will give you the same behavior as if you have Studio and select the Run All option from the green button in the upper right of Studio.
You do need to make sure that your project has some sort of trigger mechanism for any automations that you've created with entry points. Those will not run on their own and need to be triggered by an event. Usually that event might be from a RobotActivity if you are calling this from a Pega Case, a control within an interrogated application, or from a User Interface (like a Form) that you've designed with controls to invoke your automations. Those are the typical ways you invoke automations. In Studio, you can test any automation that has an entry point and it will be invoked as a stand-alone execution, however at Runtime, you need to make sure you have some event calling that automation.
I attached a simple project to illustrate calling an automation from a UI.