Skip to main content
PDF Automation Station
Community Expert
Community Expert
July 10, 2024
Question

Order of dialog popup items

  • July 10, 2024
  • 1 reply
  • 596 views

Is it possible to set a specific order in which popup items appear in a dialog window, besides sorted alphabetically?

This topic has been closed for replies.

1 reply

Thom Parker
Community Expert
Community Expert
July 10, 2024

The only thing you can do is add separators, to force separation between groups of entries.

There is also an undocumented insert function. But I'm not sure if the entries will keep the insert order. 

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
PDF Automation Station
Community Expert
Community Expert
July 10, 2024

For the seperator option, do you mean like this:

{"A--ZZZ":-1, "B--YYY": -1,  "C--XXX": -1}

with "--" as the separator, and then split the resul by that separator (string.split("--")[1] )?

Thom Parker
Community Expert
Community Expert
July 10, 2024

That technique works for ordering the items, but thats not what I meant. 

Dropdown separators are added with an undocumented function.  They separate groups of items. 

 

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