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

Search PDF doc based on value selected from a Dropdown Box

New Here ,
Mar 23, 2016 Mar 23, 2016

Can someone pleae help me figure out a way to search a pdf for a the value selected from a dropdown box. The document is being used at workstations that do NOT have keyboards, only a mouse. I have made many attempts on my onw with no success. Any assitance would be greatly appreciated!

TOPICS
Acrobat SDK and JavaScript , Windows
623
Translate
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

correct answers 1 Correct answer

Community Expert , Mar 23, 2016 Mar 23, 2016

OK, then in that case you can use this code as the drop-down's custom validation script (just make sure to tick the option to commit the selected value immediately, under the field's Properties - Options tab):

search.query(event.value, "ActiveDoc");

Translate
Community Expert ,
Mar 23, 2016 Mar 23, 2016

That's a ridiculous set up, but OK...

So how do you want it to work, exactly? Do you want the Advanced Search window to open and search the current file with the selected value in the drop-down the moment it's selected?

Translate
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
New Here ,
Mar 23, 2016 Mar 23, 2016

That is correct. It would be great if possible. Thanks for your time

Translate
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 ,
Mar 23, 2016 Mar 23, 2016

OK, then in that case you can use this code as the drop-down's custom validation script (just make sure to tick the option to commit the selected value immediately, under the field's Properties - Options tab):

search.query(event.value, "ActiveDoc");

Translate
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
New Here ,
Mar 25, 2016 Mar 25, 2016

Awesome! That should do the trick. Would it be to much work to have a button call the command?

Thanks again!

Translate
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 ,
Mar 25, 2016 Mar 25, 2016
LATEST

No, that's easily done. Let's say the name of the drop-down is "Dropdown1". Just use this code as the Mouse Up event of your button:

search.query(this.getField("Dropdown1").valueAsString, "ActiveDoc");

Translate
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