Highlighted

sorting rows

Community Beginner ,
Aug 06, 2019

Copy link to clipboard

Copied

I have a fillable pdf that I created.  It has about 12 columns and about 250 rows.  I need to be able to sort the rows either alphabetically or by client number without unaligning the rows.  Each column has info specifically related to the name on each row.  However I have to add to the end throughout the year.  Can i sort so I do not have to recreate each yeAR?

kANDICE

Views

205

Likes

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

sorting rows

Community Beginner ,
Aug 06, 2019

Copy link to clipboard

Copied

I have a fillable pdf that I created.  It has about 12 columns and about 250 rows.  I need to be able to sort the rows either alphabetically or by client number without unaligning the rows.  Each column has info specifically related to the name on each row.  However I have to add to the end throughout the year.  Can i sort so I do not have to recreate each yeAR?

kANDICE

Views

206

Likes

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
Most Valuable Participant ,
Aug 07, 2019

Copy link to clipboard

Copied

Data in a PDF file can't be sorted, unless it is all located inside of form fields and a ​lot of effort is put into writing a script that can do it.

Likes

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
Reply
Loading...
Community Beginner ,
Aug 07, 2019

Copy link to clipboard

Copied

The data is in several form fields.  Each column has a certain piece of info, and the each line is a different client.  It is a list I use each year to keep track of certain state returns I have to file.  This list has all the information to file for each client like the taxpayer number, SIC codes, NAICS Codes, etc.  So I need to keep each row in tact but be able to sort by client name.  So sorting rows not columns while keeping each row aligned.  I tried to use scripting to do this but I am doing something wrong.  Of course I don't really know what I am doing with the scripting. I am totally guessing....  I guess I just need a bit of clarification on how to use and apply the scripting.  Any Suggestions??

Likes

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
Reply
Loading...
Most Valuable Participant ,
Aug 07, 2019

Copy link to clipboard

Copied

Here's how I would do it:

- Read the data from all the fields to an array of literal objects, or arrays, or something like that.

- Clear the fields.

- Sort the array based on the desired criteria (read up on the sort method of the Array object: JavaScript Array Sort )

- Write the data from the array back to the fields.

Likes

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
Reply
Loading...
Community Beginner ,
Aug 07, 2019

Copy link to clipboard

Copied

ok need clarification

does this mean I have one column , lets say client name, do i list every client on every field both across and down.  I am sorry I dont' understand.

  Currently my list looks like this.

All the info on the row for Client A  is just for client A, same for client B.   to use the array would i

var entity name1 = "client A";

var entity name2 = "client B";

var entity name3 = "Client C";

For each column?  Because if I sort the entity column I need all the other columns to sort with it.  I am will to put the time into building a good list but I am just confused on how to use the functions.

Likes

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
Reply
Loading...
try67 LATEST
Most Valuable Participant ,
Aug 07, 2019

Copy link to clipboard

Copied

That's why you need to use something like a literal object, so you could put all the data together and then sort it as a whole.

Likes

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
Reply
Loading...
Resources
Trending Issue & Solution
Edit PDF in Adobe Acrobat Pro DC