Infopath Multiple-Selection List Box values - InfoPath Dev
in

InfoPath Dev

Infopath Multiple-Selection List Box values

Last post 05-17-2016 07:04 AM by Digao3n. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-10-2016 12:06 PM

    Infopath Multiple-Selection List Box values

     Hello all,

     I'm having a trouble while trying to get the values that my client selected in my multiple-selection list box, it's a lookup field with a filter, but simple.

     To do that, first I created a textbox field with default value: substring(eval(eval(Value[. != ""]; 'concat(";", .)'); ".."); 2) 

    Where Value is the name of my field (the multiple one), since its a lookup field, its returning the ID of the selected boxes, like 506

    So I created another field Empr[ID = Empreendimentos_Value] where it justs takes the column I want to display (the name instead the ID) and compare the ID i found in the first field with the ID of the list

    Buuuut, when I found more than one value, it returns like 506;507 and when the second field tries to compare this id with the list id, it doesnt return anything (of course 506;507 don't exists as list id) 

    I'm really running out of ideas to solve this problem .. if any1 knows anything to solve this pls write in this post, it'll help me looooots .. even if just a javascript can solve this.

     

    Thanks for reading,

    Rodrigo.

  • 05-16-2016 08:40 PM In reply to

    Hi Rodrigo,

    Welcome to InfoPathDev.

    To my understanding, you would like to compile all the values from the multi-selection list box into one field - of the same row. If this is correct, then instead I would suggest inserting Empr[ID = Empreendimentos_Value] into the double eval formula.

    since I am not sure how your fields are layed out, I am using a different double eval formula below.

    eval(eval(Empr[ID = current()/../Value], 'concat(., "; ")'), "..")

    In the sample form attached, the default value didn't seem to cooperate properly. Using a rule to trigger the calculation of the data worked for me. Could you check if this approach would work for you? If it doesn't kindly attach a copy or a sample of your form so I may have a better understanding of what isn't working for you.

    Regards,

     

     

    Don Stephen Lambatin / Support Engineer
    Qdabra Software
  • 05-17-2016 07:04 AM In reply to

    Re: Infopath Multiple-Selection List Box values

     

    Hello Donstephen,

     First of all I wanna thank you for replying.

    This is the form I have the input of data:

     

    The second multi selection list box is vinculated with the first one, depending in which options I select, the second one "Empreendimento" shows an amount of values.

    It's working perfectly, but, In my print view, I dont want the user to print all the option as it shows above, I want that he only see the ones he marked .. So thats why I'm trying to use this formulas. And when I'm selecting more than one, it's showing me this way:

     

    The "Estado" column, shows me the two "Estados" (states) I've selected when I was creating, It's working perfectly, RN and RS.

    The Empreendimento column, is returing the ID of the "Empreendimento" column when I created, using the formula:  substring(eval(eval(Value[. != ""]; 'concat(";", .)'); ".."); 2)

    Where Value is the "Empreendimento" field I've selected in the first form, but as it is a lookup field, the value is ID and the display name is Title .. I can't pass the value to Title since its a lookup, it wont work perfectly .. but ok, I did a workaround with the second textbox that is appearing in blank in the second print I've putted in here. What he does? He just compares the ID he founded, to the ID of the lookup list, Title[ID = Empreendimentos_Value]

    But as it's showing two different ID's he cant find ID 520;551 in the ID list that is like this:

     

     This is the problem, when he found only 1 ID, like 520, he goes in this list /\ and find BR-101 and works perfectly ..

    But when there is 2 ID's he doesnt understand that is BR-101; BR-226 

    It's kind of confusing but I think the prints can help a bit .. 

  • 05-17-2016 07:04 AM In reply to

    Re: Infopath Multiple-Selection List Box values

     

    Hello Donstephen,

     First of all I wanna thank you for replying.

    This is the form I have the input of data:

     

    The second multi selection list box is vinculated with the first one, depending in which options I select, the second one "Empreendimento" shows an amount of values.

    It's working perfectly, but, In my print view, I dont want the user to print all the option as it shows above, I want that he only see the ones he marked .. So thats why I'm trying to use this formulas. And when I'm selecting more than one, it's showing me this way:

     

    The "Estado" column, shows me the two "Estados" (states) I've selected when I was creating, It's working perfectly, RN and RS.

    The Empreendimento column, is returing the ID of the "Empreendimento" column when I created, using the formula:  substring(eval(eval(Value[. != ""]; 'concat(";", .)'); ".."); 2)

    Where Value is the "Empreendimento" field I've selected in the first form, but as it is a lookup field, the value is ID and the display name is Title .. I can't pass the value to Title since its a lookup, it wont work perfectly .. but ok, I did a workaround with the second textbox that is appearing in blank in the second print I've putted in here. What he does? He just compares the ID he founded, to the ID of the lookup list, Title[ID = Empreendimentos_Value]

    But as it's showing two different ID's he cant find ID 520;551 in the ID list that is like this:

     This is the problem, when he found only 1 ID, like 520, he goes in this list /\ and find BR-101 and works perfectly ..

    But when there is 2 ID's he doesnt understand that is BR-101; BR-226 

    It's kind of confusing but I think the prints can help a bit .. 

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