Creating cascaded menu that uses only one column? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Creating cascaded menu that uses only one column?

Last post 04-10-2020 08:12 PM by Daryl K. 18 replies.
Page 1 of 2 (19 items) 1 2 Next >
Sort Posts: Previous Next
  • 07-24-2019 10:38 AM

    Creating cascaded menu that uses only one column?

    I am in the early stages of an overhaul of a huge form, and one of the changes dictated by the team was the use of cascaded menus to select defect codes - because there are so darn many codes! Depending on the higher level code the levels can be from 2 to 4 deep.

    I know how to do this using a data connection to another list (called Menu) on the same SharePoint site. I've put together a simple demonstration entry and it works fine. But the problem with this method is that it requires four columns per defect entry point, and I am concerned that with 25 entries (100 columns) we may be hitting a limit (there is already a lot of other stuff on this form), or at a minimum, be having some performance issues.

    In the end the last (4th) level is the only one that counts - the other three are just to help navigate through the 100+ possible codes faster for the test techs. I have a backup plan for organizing into a single drop-down, but the menu will still be HUGE. I am hoping there's something out there I am ignorant of that allows a cascaded, 4-level menu that only uses one column to store the last value.

    Am I too optimistic?
  • 07-26-2019 07:55 AM In reply to

    Re: Creating cascaded menu that uses only one column?

    So - is this a list form? Regardless, you could use a secondary XML data source for the initial selections, and only use the "real" field for the final selection. Please see the attached example. Save the file locally. Right click and select design. Then you can preview and give it a try, and see that there is only one field in the main DS - the other dropdowns are bound to an XML file in the template.
    Hilary Stoupa

  • 07-26-2019 05:04 PM In reply to

    Re: Creating cascaded menu that uses only one column?

    I assume in a published version using this the xml would be saved to a library on the SharePoint site the form is published to?
  • 07-26-2019 05:06 PM In reply to

    Re: Creating cascaded menu that uses only one column?

    Also: what does the xml look like in this example?
  • 07-29-2019 08:16 AM In reply to

    Re: Creating cascaded menu that uses only one column?

    The XML is in the form's resource files - no need to put in online anywhere. It is a small file. Under Data > Resource Files in design mode you can see the file, and use Export to export the file so you can open it in a text editor.
    Hilary Stoupa

  • 08-01-2019 12:18 PM In reply to

    Re: Creating cascaded menu that uses only one column?

    I got pulled onto other projects and have not had a chance to get back to this, but wanted to say "thanks" for the suggestions. I think it will work, but I am such a noob in xml that I "practiced" by creating a simple 9-item drop-down in Infopath. It was a little trial-and-error since examples seem few and far between, but I eventually had success, so over the next month or so I'll experiment with the contextual, tiered menu using xml.

    It's not immediately clear to me how it's working in your example, but hopefully I can reverse-engineer the idea (though any "how to" links would also be appreciated!

    Thanks again!
  • 08-05-2019 01:06 PM In reply to

    Re: Creating cascaded menu that uses only one column?

    I've mostly reproduced this, but am stuck at one point.

    On your file if I open Filter1 - Filter3 they are configured for "Get choices from fields in this form" but the "Entries" section is blank. I get an error even if I click "OK" on the sample, yet is works in demo mode.

    Obviously I am missing something with the proper way to configure this, and it's an important part because as it is now each Filter level displays every entry in that level. In other words, right off the bat everything designated as Level 2 and Level 3 is visible in their respective drop-downs, irrespective of what is selected in Level 1.


  • 08-06-2019 09:44 AM In reply to

    Re: Creating cascaded menu that uses only one column?

    What a weird InfoPath bug. When I initially set these up, I selected the entries from a secondary data source and added filters. So, the second dropdown had a filter that looks like: /CATALOG/PLANT[ZONE = xdXDocument:GetDOM("Filter")/Filters/Filter1] and if I download my original file and preview it, I can see it still works as anticipated, but you are right - re-opening the properties for the dropdowns they don't display the selected data source or filters on that data source. You do need to add filters to your second and third dropdown - you can attach a copy of your form and I can help you with that.
    Hilary Stoupa

  • 08-06-2019 09:50 AM In reply to

    Re: Creating cascaded menu that uses only one column?

    "Filter" isn't even available until the bind the drop-down to a column, which I don't want to do.

    I am thinking about attaching it but I'd have to strip a lot of stuff out first...one reason I am slow to do so.
  • 08-06-2019 10:02 AM In reply to

    Re: Creating cascaded menu that uses only one column?

    We must be talking about different things. I'm talking about filtering the dropdown options.
    Hilary Stoupa

  • 08-06-2019 10:30 AM In reply to

    Re: Creating cascaded menu that uses only one column?

    Sorry, my bad. We were talking about the same thing but I had it configured wrong.

    So with that resolved: let's say for the Filter2 level my Data Source is my xml menu "Filter2" repeating field. Now I select the Filter Data button to edit a filter. I tried Filter1 = Filter1 since I only want to show those entries, and while it accepted this it didn't improve the outcome (every level still showed all menu entries in that level). Obviously not the right solution...


  • 08-06-2019 10:49 AM In reply to

    Re: Creating cascaded menu that uses only one column?

    Wouldn't your data source be the secondary data you want the users to be able to select from?
    Hilary Stoupa

  • 08-06-2019 10:55 AM In reply to

    Re: Creating cascaded menu that uses only one column?

    Dang - I think I just figured it out! I had imported the xml with just Filter1...FIlter3 but hadn't selected it in my value filter. Once I did that it seems to be working!

    It's just an ultra-simple example now, but I needed a proof-of-concept before I expand it into a full-blown solution, but now I think I have the idea.

    Thanks for all your help Hilary!
  • 08-08-2019 05:40 AM In reply to

    Re: Creating cascaded menu that uses only one column?

    Ya know, I've got this working fine now and understand it too, but I have this exact same bug yours displayed: anytime I close the Infopath file then reopen it the three filter drop-downs lose their configuration. SO long as it's open and I keep clicking Save it's OK, but close it at the end of the day and I have to reconfigure all of them the next day.

    What a PITA. I am guessing with zero patches coming for Infopath that this is something we just have to deal with??
  • 08-08-2019 07:43 AM In reply to

    Re: Creating cascaded menu that uses only one column?

    Does it still work, if you don't change the dropdowns at all? In my case, the form continued to work as anticipated, as long as I didn't modify the dropdowns - the configuration is stored in the view files, and I think it is just a bug with displaying the selections. I wouldn't anticipate this will ever be fixed.
    Hilary Stoupa

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