Hide/Reveal Section Based on Multi-Selection Choice Pulling from SQL DB - InfoPath Dev
in

InfoPath Dev

Hide/Reveal Section Based on Multi-Selection Choice Pulling from SQL DB

Last post 05-18-2012 09:21 AM by Jen B. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-18-2012 07:57 AM

    Hide/Reveal Section Based on Multi-Selection Choice Pulling from SQL DB

    Ok...  I hope I can explain this clearly.

    First, I have a SQL DB data connection set up in IP 2010.  The tables have a lot of data that I'm using to create cascading/dependent choices for the end user (Business Operation > Organization > Line of Business > Job Function > Specialty).  I wanted to clearly show the next choices available in correlation to each choice.  For example, the Organization field is a multi-selection check box with 5 choices... we'll call them apple, banana, cherry, pear and grapes.  I didn't want to mix the next options available... e.g. Org Apple may have Line of Business of Honeycrisp and Gala and Org Pear may have Lines of Business of Asian and Bosc.  If a user chooses Apple and Pear as the Orgs, I wanted the next options to show in separate fields...  Apple LOB choices and Pear LOB choices in their own sections.

    So, I though I could create separate sections that would hide/reveal based on Org chosen and then filter choices available in those multi-selection fields.  My problem is setting up the hide rule.  I don't have line of sight into the tables I'm pulling from as I don't own the db and seem to be having an issue being able to figure out the "is not equal to" value to enter in the formula.  I THOUGHT since I am using the same choice for value and display name, that I could just use what shows up for the display name, but it doesn't seem to be working.

    Here's what I've got...

    Org choices that appear in multi-selection field called Organization (in the Multi-Selection List Box Properties window both the Value and Display name are set to the same thing): 

    • BREC
    • Broker & Employer Operations
    • Claims Operations
    • Member Services
    • Provider & Network Services

    I thought I could set up the section formatting rules to say Hide when Organization does not equal BREC.... but that isn't working.  I tried changing the Multi-selection properties value and display to show the numeric identifier from the table (so I could see what they were), and then set up value as the numeric identifier and display name as the actual names... and tried again with Hide when Organization does not equal 41 (the numeric identifier) - also didn't work.

    So... am I not able to set up hide/reveal based on a multi-selection field?  Or am I doing something horribly wrong?  If the display name and value are set as the same field, shouldn't I be able to use the name that displays in the formula?

    Thanks in advance for any insight that can be provided!

     

  • 05-18-2012 08:32 AM In reply to

    Re: Hide/Reveal Section Based on Multi-Selection Choice Pulling from SQL DB

    I think you have it almost right here:

    Hide when Organization does not equal BREC

    In the left dropdown box, pick Select field or group, select Organization and then from the dropdown at the bottom of that selection dialog, pick All instances of so you wind up with:

    Hide when All instances of Organization are not equal to BREC

    I believe that should work.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 05-18-2012 09:21 AM In reply to

    Re: Hide/Reveal Section Based on Multi-Selection Choice Pulling from SQL DB

    I was super hopeful that would work, but alas when I preview and choose BREC the section is still not showing up.  Any other thoughts?

     

    **Update... it DOES work if I'm using a repeating section with dropdowns, but I'd like to be able to use the multi-selction field rather than dropdowns.  That's when it doesn't seem to work.

     ***LOL  I'm an idiot.  If you don't have the section include something to SEE it makes it hard to notice when it DOES show up.  I think I need to stop staring at my computer for such long stretches. 
    Thanks Jimmy!!

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