• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
13

Extract Field Values from External Source

Community Beginner ,
Nov 13, 2023 Nov 13, 2023

Copy link to clipboard

Copied

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 

TOPICS
JavaScript , PDF forms

Views

164

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 13, 2023 Nov 13, 2023

Copy link to clipboard

Copied

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".

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 13, 2023 Nov 13, 2023

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 13, 2023 Nov 13, 2023

Copy link to clipboard

Copied

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 PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 13, 2023 Nov 13, 2023

Copy link to clipboard

Copied

Read the documentation of the readFileIntoStream method of the util object to see how it can be done. Note it has to run from a privileged context, though, and the files have to be plain-text, or you need to write a decoder for them.

 

PS. Your post doesn't have any upvotes, only views.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

Thanks for the info. I will read about the text file reading.

 

I wish I knew how to turn off upvote email notifications, because for not having any I still received 13 emails into my work mailbox. They stopped yesterday after turning off all email notifications in notifications settings, but today there are another 4 with subject reading: "<AdobeUser> upvoted your post in Adobe Community." Can't win for losing.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 14, 2023 Nov 14, 2023

Copy link to clipboard

Copied

LATEST

Email notifications were turned back on today. That is why I am getting the upvoting notifications. This is great incentive to not use the community forums if Adobe won't respect my notification preferences..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines