Skip to main content
Participating Frequently
November 13, 2023
Question

Extract Field Values from External Source

  • November 13, 2023
  • 1 reply
  • 718 views

Hi,

 

I created a form. Two of the fields are Name and Number. Name and Number are related - the number assigned to a name never changes. It is two ways of identifying an indivdual and it is standard to use both identifiers when referring to an individual.

 

I would like the field for Number to populate based on the value entered in Name, or have it work the other way - if you enter Number then Name populates. In the event that Name is mispelled, or Number entered incorrectly, then no automatic population occurs.

 

The set of individuals changes constantly. There is a spreadsheet that is published daily but it would get tricky coding a link to the file as the networked location and name change with the date. We also maintain an Access database that could possibly be tapped for the data, but I am no database expert.

 

I'm thinking what I want to do isn't feasible just to save some keying in. Anyone have a good idea?

 

Thanks

david 

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
November 13, 2023

You can access it using a custom-made script, if it's a plain-text file. If the name of the file is predictable (even if it changes daily) that should still work. However, this will require installing a script file on the local machine of each user who will access this file.

This is not a trivial scripting task, though. If you're interested in hiring a professional to create it for you, feel free to contact me privately by clicking my user-name and then on "Send a Message".

Participating Frequently
November 13, 2023

Thanks for the input. The file most definitely must be user friendly with little to no thought by people entering in names & numbers. The excel spreadsheet is named by date, such as 111323.xls. The location for today's file is L:\<network_location>\2023\11 November so it should be evident how that changes with the date, too. Any script would have to take this into account. I could convert the file myself and put it in a specific spot named the same thing every day, but I do not work every day, thankfully. To further complicate it I just looked at the spread sheet (I use my own means of tracking, not this spreadsheet) and the Name is split into last and first so it would get hairy coding this, I'm sure. Our organization is not going to authorize professional consulting, but thanks for the offer.

 

Thanks again. Interesting reading, hopefully, in a puzzle solving way. I got several upvotes on this, so people would probably be interested in how you would extract data from a text file with script if you can describe that in a generic way.

Thom Parker
Community Expert
Community Expert
November 13, 2023

An Acrobat script cannot read a an XLS file. The data has to be in a plain text file, such as CSV, which can be exported from Excel. 

  

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often