Skip to main content
Participant
August 6, 2021
Question

Have the values in one combo box be filtered based on what went into another combo box

  • August 6, 2021
  • 2 replies
  • 473 views

Here's what I'm facing:

 

In this scenario we may have 20 Organizations with 30 Department Addresses. If I put the Org's in one combo box there of course would be 20 selections. If I placed all the Department Addresses in the next combo box there would be 600 selections and nothing assuring that the Department Address chosen was in the correct Org.

 

 

If Org 1 is chosen then the next combo box selection will be only those addresses under Org 1. If Org 2 is selected the next combo box selection will be only those Department Addresses under Org 2

 

Organization                                      Department Address

Org 1                                                     100 Washington Street

                                                                30 Congress Street

                                                                50 State Street

 

 

Org 2                                                     200 Franklin Street

                                                                450 Gloucester Street

                                                                700 Newbury Street
Thank you,

Robert

    This topic has been closed for replies.

    2 replies

    Nesa Nurani
    Community Expert
    Community Expert
    August 6, 2021

    Lets say your dropdown fields names are "Organization" and "Department Address", as Validation script of  "Organization" field use this:

    if(event.value == "Org1"){
    this.getField("Department Address").clearItems();
    this.getField("Department Address").setItems([["100 Washington Street"], ["30 Congress Street"], ["50 State Street"]]);}
    else if(event.value == "Org2"){
    this.getField("Department Address").clearItems();
    this.getField("Department Address").setItems([["200 Franklin Street"], ["450 Gloucester Street"], ["700 Newbury Street"]]);}
    else this.getField("Department Address").clearItems();

    I belive you will have no trouble adding additional "Org" to the script.

    You can also check "Commit selected value immediately" in "Organization" field under properties->options tab.

     

    LinSims
    Community Expert
    Community Expert
    August 6, 2021

    Please let us know which program you are having problems with. Someone will be along to move this post to the appropriate product forum, where you are more likely to get an answer to your question.

    The Using the Community forum is for help in using the Adobe Support Community forums, not for help with specific programs. Product questions should be posted in the associated product community.

    RDMasAuthor
    Participant
    August 6, 2021

    Acrobat Pro

     

    Moving from Using the Community (which is about the forums) to the correct forum... Mod
    To ask in the forum for your program please start at https://community.adobe.com/