Move and Sort in PDF

Community Beginner ,
May 29, 2018

Copy link to clipboard

Copied

Hello All!

I am working on a project at work where I allow the user to assess some hazards to their location. The result is that the hazards are given a value and a qualitative ranking. I now need to be able to move those hazards to a ranking list, but have them sorted, highest to lowest, based on their output value.

For example:

HazardValueQualitative Ranking

Tornado

50High
Hurricane45High
Earthquake38Mod. High
Terrorist25Med. Low
Flood11Low

Before that they would be in order based on the user's initial input: Hurricane, Terrorist, Flood, Earthquake, Tornado.

My thoughts are this: The values of the hazards would be assessed, maybe into an array, then placed in highest to lowest order into the next page (where the ranking occurs), and then the corresponding hazard is found and moved to the hazard text field, next to the value text field.

If this isn't possible, then I will need to investigate other ways to potentially produce this output, as it is a necessity of this project.

I currently have this tool built in Excel, but it is very laggy, especially compared to the user-end of the current PDF tool.

Any help you can provide will be greatly appreciated!

Thanks,
Christopher Pounds

TOPICS
Acrobat SDK and JavaScript, Windows

Views

125

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

Move and Sort in PDF

Community Beginner ,
May 29, 2018

Copy link to clipboard

Copied

Hello All!

I am working on a project at work where I allow the user to assess some hazards to their location. The result is that the hazards are given a value and a qualitative ranking. I now need to be able to move those hazards to a ranking list, but have them sorted, highest to lowest, based on their output value.

For example:

HazardValueQualitative Ranking

Tornado

50High
Hurricane45High
Earthquake38Mod. High
Terrorist25Med. Low
Flood11Low

Before that they would be in order based on the user's initial input: Hurricane, Terrorist, Flood, Earthquake, Tornado.

My thoughts are this: The values of the hazards would be assessed, maybe into an array, then placed in highest to lowest order into the next page (where the ranking occurs), and then the corresponding hazard is found and moved to the hazard text field, next to the value text field.

If this isn't possible, then I will need to investigate other ways to potentially produce this output, as it is a necessity of this project.

I currently have this tool built in Excel, but it is very laggy, especially compared to the user-end of the current PDF tool.

Any help you can provide will be greatly appreciated!

Thanks,
Christopher Pounds

TOPICS
Acrobat SDK and JavaScript, Windows

Views

126

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
May 29, 2018 0
Explorer ,
May 29, 2018

Copy link to clipboard

Copied

Is there a maximum number of hazards? How are the hazards selected? (checkboxes? a drop down? something else?)

If there is a maximum number, this will be pretty easy but you'll need to respond to the above before I can advise more. If not, don't bother trying this with a PDF form unless you want to get into developing a Dynamic Form using Adobe LiveCycle which is... let's call it... "challenging".

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...
May 29, 2018 2
Community Beginner ,
May 29, 2018

Copy link to clipboard

Copied

So there is currently a "maximum number of hazards". This would apply to another section which also has a maximum number of values as well.

The current maximum hazards is 20, but will most likely increase (if I can move forward with the sort process) to 25-30.


The other values currently max out at 60, but may (if the need is present) be moved to 100.

The form is not dynamic in its allowance of inputs, and while that might be handy to do, it is not a function I have the capability to build (no LiveCycle at work - to my knowledge), nor do I want.

I hope this helps you help me!

Thanks

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...
May 29, 2018 0
Explorer ,
May 29, 2018

Copy link to clipboard

Copied

Ok - With a maximum number of hazards, the "list" of field values will end up being generated based on the user selections. Is the user selecting checkboxes? That would be the most efficient. Will any two hazards have the same value? If so, what would be the secondary sort criteria?

Essentially what will happen is as the user selects (checks) hazards, a script will look at the chacked boxes and fill the list values. The list will actually be all read-only fields. You won't be "moving" any fields, they'll just repopulate with every check/uncheck.

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...
May 29, 2018 1
Community Beginner ,
May 29, 2018

Copy link to clipboard

Copied

So the initial calculated fields are populated by adding values associated with groups of Option Buttons (Radio Buttons).

THERE is a POTENTIAL for hazards have similar values based on the inputs of the user. The secondary sort criteria could be Hazard A is higher than Hazard B, based on the name of the hazard in alphabetical order, or whichever one was first in the user input portion.

The other part (60 items) is similar. User input using option buttons, possible to have similar values. This is ranked once based on initial input, and then a second (and final) time based on adding the value of the 60 items and the hazards (as they are chosen per item) together.

Below are some screenshots to show you what the forms look like:Tool Risk Assessment.JPG

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...
May 29, 2018 0
Community Beginner ,
May 29, 2018

Copy link to clipboard

Copied

I clicked add reply early. Here are the other two screenshots:

Tool Part I.JPG

Tool Part II.JPG

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...
May 29, 2018 0
Explorer ,
May 29, 2018

Copy link to clipboard

Copied

So... You're expecting users to type in a hazard by name rather than select from some predefined list? That's just not going to work. In order to have a hazard name be associated with a sort value, there needs to be some sort of lookup table. Additionally, you REALLY don't want to have users entering data in rows and then have that row jump around when the sorting occurs. That's just a bad user experience. You may need to use a dialog to capture the initial set of hazards, then populate the list in sorted order, then have them fill the radio buttons.

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...
May 29, 2018 0
Community Beginner ,
May 29, 2018

Copy link to clipboard

Copied

So if I were to use dropdown lists to populate the hazards, would that work?

Also would the part II be able to be sorted, because the "mission essential functions" are moved from another form that the user inputs? If so then I don't need them sorted after Part I.

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...
May 29, 2018 0
Explorer ,
May 29, 2018

Copy link to clipboard

Copied

If you had a non-printing dropdown and a button where the user could select a hazard and then click the button to add it to the list, that could work. But now that I'm looking at all the data associated with each row and how that will all need to be tracked in the sort, I'm thinking you REALLY don't want to do this in a PDF. If you're finding Excel to be laggy, you're going to put a lot of effort into coding this up in Acrobat JavaScript only to end up with something with even worse performance.

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...
May 29, 2018 0