Merging multiple repeating sections dropdown selections - InfoPath Dev
in

InfoPath Dev

Merging multiple repeating sections dropdown selections

Last post 02-22-2010 09:16 PM by Qazi Anis. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 01-18-2010 02:02 PM

    Merging multiple repeating sections dropdown selections

    Hi,

    I have a form where a user can pick multiple items from a repeating section drop down box, I am using the repeating selection because a multi-selection-dropdown doesnt work on web-enabled forms. What I cant figure out is how to merge the results of all repeated sections into a single (comma delimted) textbox or variable for later use.

    The form is a change control, where the user (tech) will select the servers he is working on, I need a concatenation of all the repeating sections (and a count of how many sections there are) so I can send an email to the monitoring system to advise it to ignore.

    without repeating sections, I can use a single drop down, the user can pick the server, and the result is easily accessible but I cant figure out how to merge these repeating sections selections.

     

    Design mode:

     

     

     Form Preview:


    In the above attached example, it only shows the first item in the textbox. (although it is blank in this image)

     

  • 01-18-2010 09:08 PM In reply to

    Re: Merging multiple repeating sections dropdown selections

    add a text box say concat values and in the set its default value to eval(eval( repeatingsectiongroup,`concat("my:dropdownfield",";")`),"..")

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 02-14-2010 05:22 PM In reply to

    Re: Merging multiple repeating sections dropdown selections

    Thanks Qazi,

    I think I have almost got it, but I cant seem to get anything other than the first result.

     

     

    this is my formula

    • eval(eval(MSS, 'concat(../my:MSS/my:Multi_servers_Affected/my:Multiple_server_selector, ";")'), "..")

     

    this is the data source

     

    and this is what it looks like

    The very bottom textbox should have the list.

     

     

    Any idea's?

     

    Thanks again for your help.

     

  • 02-14-2010 09:59 PM In reply to

    Re: Merging multiple repeating sections dropdown selections

    eval(eval(MSS, 'concat(my:Multiple_server_selector, ";")'), "..")

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 02-16-2010 03:07 PM In reply to

    Re: Merging multiple repeating sections dropdown selections

    yours : eval(eval(MSS, 'concat(my:Multiple_server_selector, ";")'), "..")

    mine :  eval(eval(MSS, 'concat(my:Multiple_server_selector, ";")'), "..")

    returns this formula error:

    "../my:MSS/my:Multiple_server_selector" does not point to a valid location path of a field or group.

    if I select the Multiple_server_selector from the field selector it shows like this in the formula (note underline showing valid reference)

    eval(eval(MSS, 'concat(Multiple_server_selector, ";")'), "..")

    but when I press OK. it transforms to

    eval(eval(MSS, 'concat(../my:MSS/my:Multi_servers_Affected/my:Multiple_server_selector, ";")'), "..")

     

    which looks to me like pretty much the same thing only nested in the heirarchy. 

    I believe

    eval(eval(MSS, 'concat(my:Multiple_server_selector, ";")'), "..")

    is the same as

     eval(eval(MSS, 'concat(../my:MSS/my:Multi_servers_Affected/my:Multiple_server_selector, ";")'), "..")

     

    but yeah, its only returning the first result.

     What do you think?

     

    Cheers

     

     

     

  • 02-16-2010 10:07 PM In reply to

    Re: Merging multiple repeating sections dropdown selections

    sorry for the confusion, it is

    eval(eval(Multi_servers_Affected, 'concat(my:Multi_server_selector, ";")'), "..")

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 02-18-2010 12:23 PM In reply to

    Re: Merging multiple repeating sections dropdown selections

    Sorry for the trouble, it is still not working (perhaps because I dont understand the EVAL function)

    so this is what I was using

    eval(eval(MSS, 'concat(../my:MSS/my:Multi_servers_Affected/my:Multiple_server_selector, ";")'), "..")

    which is the automatically adjusted form of what you suggested first1.

    this is what you suggested now

    eval(eval(Multi_servers_Affected, 'concat(my:Multi_server_selector, ";")'), "..")

    which I put in (using the insert field  button

    eval(eval(Multi_servers_Affected, 'concat(Multiple_server_selector, ";")'), "..")

    and I got this error message

    "../my:MSS/my:MSS/my:Multi_servers_Affected/my:Multiple_server_selector" does not point to a valid location path of a field or group.

    I noted it had two /my:MSS 's for some reason so I changed it to (in Xpath Mode) to

    xdMath:Eval(xdMath:Eval(../my:MSS/my:Multi_servers_Affected, 'concat(../my:Multi_servers_Affected/my:Multiple_server_selector, ";")'), "..")

    (basically removed the ../my:MSS from the :Multiple_server_selector part)

     it said no errors, so I ran it but I get the same result in each box like so

     

     

     

     Sorry for dragging this out. I cant get it to work.

    for the record, if it makes any difference, I am using Infopath 2007 sp2

    (also, in the very first screenshot showing the datasources, this group was originally called Group1 but I renamed it to MSS)

     

  • 02-18-2010 09:34 PM In reply to

    Re: Merging multiple repeating sections dropdown selections

    please find attached a sample template. hope this helps

    Qazi Anis
    Technical Architect
    Bitwise Inc
  • 02-22-2010 08:16 PM In reply to

    Re: Merging multiple repeating sections dropdown selections

    Now that I have it working it bewilders me why it wasnt working before.

    so, I see now it needs the ' my: ' part. selecting it doesnt seem to work.
    I can only assume that when I was typing my:blah_blah_blah I did  a typo

     

    Thanks for your patience Qazi, it is working now, thanks!

    eval(eval(Multi_servers_Affected, 'concat(my:Multiple_server_selector, ";")'), "..")

     

  • 02-22-2010 09:16 PM In reply to

    Re: Merging multiple repeating sections dropdown selections

    when you select a field, it gives the full xpath with it while at this point we only needed the relative path.

    Qazi Anis
    Technical Architect
    Bitwise Inc
Page 1 of 1 (10 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.