Hide Dropdown List option based on another dropdown list option selection - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Hide Dropdown List option based on another dropdown list option selection

Last post 07-05-2022 02:11 PM by Hilary Stoupa. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 07-05-2022 08:13 AM

    • lahsin
    • Not Ranked
    • Joined on 06-28-2022
    • Posts 8

    Hide Dropdown List option based on another dropdown list option selection

    Hello I have the following two dropdown below: Column a drop down: A,b,c,d Colunmb b dropdown, 1,2,3,4,5,6,7 When A is select in column a, hide 2,4,6 and show 1,3,5,7 If any other is select in column in that column a it should be the default value, it should only work only when A is selected. Any help will be highly appreciated.
  • 07-05-2022 08:31 AM In reply to

    Re: Hide Dropdown List option based on another dropdown list option selection

    This is something you'll need to use a secondary data source for in order to be able to apply a filter. You can either use an XML file, or, if you are using SharePoint, use a SharePoint list.
    Hilary Stoupa

  • 07-05-2022 08:36 AM In reply to

    • lahsin
    • Not Ranked
    • Joined on 06-28-2022
    • Posts 8

    Re: Hide Dropdown List option based on another dropdown list option selection

    Can you walk me through on how I can achieve this?
  • 07-05-2022 08:40 AM In reply to

    Re: Hide Dropdown List option based on another dropdown list option selection

    Are you using SharePoint at all? If so - I'd create a list there for the options. I can create a sample for you with XML tho - but I don't understand this sentence: "If any other is select in column in that column a it should be the default value, it should only work only when A is selected"
    Hilary Stoupa

  • 07-05-2022 08:54 AM In reply to

    • lahsin
    • Not Ranked
    • Joined on 06-28-2022
    • Posts 8

    Re: Hide Dropdown List option based on another dropdown list option selection

    Yes I am using sharepoint but currently creating the form in InfoPath. What I meant by saying ""If any other is select in column in that column a it should be the default value, it should only work only when A is selected" Lets see any other option is selected besides option A, the drop down should work normal. Only when option A is selected then it should hide 2,4,6 and show 1,3,5,7. Any other option selected it should work as normal
  • 07-05-2022 09:02 AM In reply to

    Re: Hide Dropdown List option based on another dropdown list option selection

    I think you'll need to at least use a secondary data source (either XML or a SharePoint list) for the second dropdown for "column b" then - will these options change very often? Or are they pretty static?
    Hilary Stoupa

  • 07-05-2022 09:17 AM In reply to

    • lahsin
    • Not Ranked
    • Joined on 06-28-2022
    • Posts 8

    Re: Hide Dropdown List option based on another dropdown list option selection

    They are static data, as you mention the XML file be great for this.
  • 07-05-2022 09:31 AM In reply to

    Re: Hide Dropdown List option based on another dropdown list option selection

    See attached. Right click the linked form in the post header, save it locally. Right click the locally saved file and select Design to open in Design mode. Preview to see the filters working. Filter is added to the dropdown selection for the column b dropdown.
    Hilary Stoupa

  • 07-05-2022 09:47 AM In reply to

    • lahsin
    • Not Ranked
    • Joined on 06-28-2022
    • Posts 8

    Re: Hide Dropdown List option based on another dropdown list option selection

    Perfect, that works. Do you mind sharing the process and how you store the xml file? Thank you so much. I really appreciate this
  • 07-05-2022 09:56 AM In reply to

    Re: Hide Dropdown List option based on another dropdown list option selection

    Under the data tab in the ribbon in InfoPath designer, there is a "resources" button - the XML file is stored as a resource in the form. You can export it from there, and just add a data connection to your form to the same file - it can be added to the form resources when you add it. If you look at the properties for the column B dropdown in the sample form, and click the field picker for the row for the repeating data, you can see the filter formulas I used to show / hide rows.
    Hilary Stoupa

  • 07-05-2022 11:00 AM In reply to

    • lahsin
    • Not Ranked
    • Joined on 06-28-2022
    • Posts 8

    Re: Hide Dropdown List option based on another dropdown list option selection

    Thank you so much. Question: Can this be done without data from external source? can it be done from enter choices manually?
  • 07-05-2022 02:11 PM In reply to

    Re: Hide Dropdown List option based on another dropdown list option selection

    You can't add a filter to a dropdown that has manual choices. You could have two dropdowns if for some reason you want to use manually entered choices - one with all the options, and one with only the options that show when "A" is selected - and use conditional formatting on the dropdown controls to show / hide them appropriately.
    Hilary Stoupa

Page 1 of 1 (12 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.