Multiple-Selection List Box questions - InfoPath Dev
in

InfoPath Dev

Multiple-Selection List Box questions

Last post 02-10-2012 11:31 AM by milhouse11. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-10-2012 08:10 AM

    Multiple-Selection List Box questions

    Hey guys,

     I haven't been able to find any good answers for my questions, so hopefully someone can help.

    Question 1: 

    I have a form with a data connection that pulls 2 columns from a SP list: Code and Statement.  I have a Multiple Selection List Box that uses this data source.  What I would like to do is concatenate Code and Statement for the Display Name, but only use Code for the value that gets stored.  What I assume I have to do is replicate this secondary data source repeating table in my Main data source, create a field in that new repeating table that concatenates these 2 values, and use that as the data source in my list box control.  However, I can't figure out how to loop through the entire secondary data source in order to fully populate the new repeating table in Main.  I'm trying to avoid using code because I'm not sure if the person who will take over this form after me will be comfortable with maintaining it.  I've seen some posts regarding a double EVAL function, but I haven't been able to get it to work.

    Example:

    Code          Statement

    P101           Blah Blah Blah

    P102           More Blah

    Multiple Select List Box displays:

    P101 - Blah Blah Blah

    P102 - More Blah

     

    Question 2:

    I would like to automatically select values in the above multiple-selection list box based on the value of a drop-down.  I created a rule that fires when the drop-down is selected, but it only checks the first value that satisfies the condition.  So, I need to figure out how to iterate through the entire data source table to check all values that satisfy the condition.  There's actually a 3rd column in the data source I mentioned earlier called Physical_State.  When the user selects Physical State in the dropdown, I want all Codes in my multiple-select list box associated with that Physical State to be selected.

     Any help would be much appreciated.

  • 02-10-2012 10:20 AM In reply to

    Re: Multiple-Selection List Box questions

    Hi there,

    1) You should create a new calculated column in your SP list that concatenates Code and Statement together.  Then pull down this column into InfoPath and use it as your Display Name.

    2) This will likely be tough to accomplish since InfoPath doesn't support adding new nodes through rules out of the box.  You'll probably need custom code for this.  Another great alternative is qRules will allows you add nodes without have to write code, so that might be something to look into.

    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 02-10-2012 11:31 AM In reply to

    Re: Multiple-Selection List Box questions

    Thanks Anson.  I actually tried the concatenated column in SP at the very beginning, but unfortunately InfoPath (using 2007) will not pull in calculated list columns, at least from my experience.

     If there is no other way, I may just go the code route to accomplish what I need.

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