Multiple Selection List - Rules issue - InfoPath Dev
in

InfoPath Dev

Multiple Selection List - Rules issue

Last post 10-20-2014 09:57 AM by michaelrkistler. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 12-13-2010 10:49 PM

    • SysEng
    • Not Ranked
    • Joined on 12-14-2010
    • Posts 5

    Multiple Selection List - Rules issue

    Hi All,

    I'm quite new to Infopath(2010), so please be gentle. Anyway, I have a multiple selection list box(selectionBox) and have created a number of rules. For each option I want to be able to set a value in a corresponding text field. The text field will be used for a Sharepoint workflow
    As an example I have 3 options( i have attached an Infopath example)
    1.Option1 -> Set value in text field name field1
    2.Option2 ->Set value in text field name field2
    3.Option3 ->Set value in text field name field3

    If you select Option 1 I want to set a text box(field1) value to say <domain>\<username> (this is hard coded to a username). If you deselect Option 1 I want to ensure I clear the value to blank.
    If you select Option 2 I want to set a text box(field2) value to say <domain>\<username> (this is hard coded to a username). If you deselect Option 2 I want to ensure I clear the value to blank.
    then same with Option 3.

    For each option selected I have a set rule and a clear rule. The set rule runs when the selectionBox field equals Option1. The clear rule run when the selectionBox field DOES NOT equal option1. The same applied to the other options

    What I'm finding is I'f I select Option 1, it sets the text field 1 to domain\username1. Then if I select Option 2, it set the text field 2 to domain\username2, but then clear text field 1 to blank.

    Any help would be greatly appreciated.

    Michael

     

  • 12-13-2010 11:18 PM In reply to

    Re: Multiple Selection List - Rules issue

    It sounds like what's happening is that the clear rule is looking at the most recently checked value, finding it is not equal to the Option1 value, and clearing field1.  There is probably a way around this, but have you verified that the clear rules actually work when they're supposed to?  My guess is that they won't, because of some behavioral quirks in multi-select list boxes.  You might be better off using separate checkboxes here.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 12-14-2010 04:02 AM In reply to

    • SysEng
    • Not Ranked
    • Joined on 12-14-2010
    • Posts 5

    Re: Multiple Selection List - Rules issue

    Hi Jimmy,

     

    Thanks for your quick response. The clear rules don't work correctly as it seems that the conditions only look at the most recent value(as you have stated).I would use a checkbox, but I actually have the selection values coming from a sharepoint list. I would really like to know if it is possible to use a multiple selection list box to do this and without code?

    Michael

  • 12-14-2010 06:04 AM In reply to

    Re: Multiple Selection List - Rules issue

    Please try the attached form.  The quirk about multi-select boxes is that rules only fire when a box is checked, not when one is unchecked.

    The trick I've used in this form is that I use a separate field (and its default value formula and the multi-select box's rules) to track the concatenated value of all the checked items.  Then I put the rules on that field, because its value will change whenever a box is checked or unchecked.

     When setting up your clear rules, make sure you use All occurrences of x | not equal to | y.  If you just use x | not equal to | y, then the Clear Rule will always fire.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 12-16-2010 09:53 PM In reply to

    • SysEng
    • Not Ranked
    • Joined on 12-14-2010
    • Posts 5

    Re: Multiple Selection List - Rules issue

    Hi Jimmy,

    Your a champ. That worked perfectly.

  • 10-03-2012 11:06 AM In reply to

    Re: Multiple Selection List - Rules issue

    This looks exactly like what I am looking for except I need to retrieve my values from an external source. I have set it up the way you have in your example but the 'tracker' field does not populate with anything.

    Is there something special that would need to be done to make it work with values inputted from an external list source?

  • 10-20-2014 09:57 AM In reply to

    Re: Multiple Selection List - Rules issue

    Any experience with doing this on 2013 since they've deprecated the functions
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.