writing values from a multiple-selection list box to another control - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

writing values from a multiple-selection list box to another control

Last post 07-12-2019 08:58 AM by Hilary Stoupa. 72 replies.
Page 4 of 5 (73 items) < Previous 1 2 3 4 5 Next >
Sort Posts: Previous Next
  • 05-01-2014 01:55 PM In reply to

    • Joy_T
    • Not Ranked
    • Joined on 10-25-2012
    • Posts 20

    Re: writing values from a multiple-selection list box to another control

     This information has been immensely helpful.

     Unfortunately, though mine is showing all the selected values, it is not adding in the semicolon.

    The formula being used for the value for the text field (and the rule on the multiple-selection field) is based on the information from Jimmy:

    substring(eval(eval(Projectors-C1, 'concat(";", .)'), ".."), 2)

    "Projectors-C1" is actually the group for the Multiple-Selection field.. I tried to use the "Value" field, but it would only let me select it as a dot.  It gave me errors when I tried to change it to ../my:Value.  But it is still pulling the data... just without any separators.

    Any help would be greatly appreciated!!

    (I then have to concatenate three of these together so that I will just have one column of data showing in the SharePoint list)

  • 05-02-2014 08:54 AM In reply to

    • Joy_T
    • Not Ranked
    • Joined on 10-25-2012
    • Posts 20

    Re: writing values from a multiple-selection list box to another control

     An update -

    After much trial and error, I have finally gotten it to work.

     I discovered that my formulae needed to be:

    For the MSLB rule:

    substring(xdMath:Eval(xdMath:Eval(../../my:group1/Value[. != ""], 'concat("; ", .)'), ".."), 2)

    (the error I had been receiving when trying to set it to "Value" was that it needed an additional ../ at the beginning, which took lots of trial and error to figure out)

     

    and for the value of the text field:

    substring(xdMath:Eval(xdMath:Eval(../my:group1/Value[. != ""], 'concat("; ", .)'), ".."), 2)

     

    Thank you to all who had posted the original solutions to this, it was only by working off of your solutions that I was able to do this! :)

  • 02-10-2015 09:13 AM In reply to

    • Wendie1970
    • Not Ranked
      Female
    • Joined on 02-10-2015
    • Fort Worth, TX
    • Posts 5

    Re: writing values from a multiple-selection list box to another control

     Jimmy,

    Your solution saved me.  Great formula, and now part of my tool box!

     

  • 04-20-2016 09:25 PM In reply to

    Re: writing values from a multiple-selection list box to another control

    Hi Larry, I looked at your example. I am trying to do exactly what you did in your example. When I tried to copy the Txt field's default value formula to set value based on MSLB field change action rule, i get an error message = "field1" does not point to a valid location path of a field or group. I tried adding both using xpath and basic method. Seems like it does not allow adding "is not blank" filter on itself. I noticed that your example xsn file does not have this issue. What am I doing wrong? I spent hours now to trying to figure this out. very frustrating ... I'd appreciate if anyone can help.
  • 04-21-2016 12:59 PM In reply to

    Re: writing values from a multiple-selection list box to another control

    What is the formula you are trying? What is your form's schema? You can attach a template or screenshot under the Options tab in a reply.
    Hilary Stoupa

  • 06-26-2016 10:53 PM In reply to

    Re: writing values from a multiple-selection list box to another control

    Is this working with Sharepoint list based formes? When i use the rules in that form it shows only ID's of the selections.
  • 12-06-2016 08:47 AM In reply to

    Re: writing values from a multiple-selection list box to another control

     Hi Folks it looks like I have run into the same issue.

     I'm trying to look at the multi-select box called Product Categories Display so I can hide the submit button if it's not filled in. The way that control should work is that when an Event Category is selected the Event Sub Categories are displayed. These are filtered by the selections made in Event Category. Thanks for the Help Hilary!

     I am super close! I tried a calculated text box but I can't evaluate that number from another control and I can't store those values off to a list. 

     Thanks in advanced for the help. 

    Kenneth Kerr
  • 12-06-2016 09:05 AM In reply to

    Re: writing values from a multiple-selection list box to another control

     You just need to disable the submit button if no event categories are selected? Is that what you are trying to do? If so, see attached screenshot - you could add conditional formatting to the submit button to disable it if all instances of the field are blank.


    Hilary Stoupa

  • 12-06-2016 09:12 AM In reply to

    Re: writing values from a multiple-selection list box to another control

    Thanks so much. That worked for me. I did try that but I have some disabled  rules that were not allowing the rule underneath to fire.

     

    Thanks Again Hilary! 

    Kenneth Kerr
  • 01-31-2017 08:47 AM In reply to

    Re: writing values from a multiple-selection list box to another control

     Hi

    I know this is an old post - but it is exactly my issue.

    I have looked at your sample and I just cannot get mine to work.

    The location of my repeating (multiple selection field) is /dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:Site/Value

    The location of the Field(Sites) I want to concatenate the items into is /dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:Sites 

    The default value I have created in Sites is substring(xdMath:Eval(xdMath:Eval(../my:Site/Value[. != ""], 'concat(";", .)'), ".."), 2)

    When I preview the form and select some values Sites is empty. I am obviously doing something wrong.

    Can anyone see what is wrong/missing

    Thank you

    Catharine 

     

  • 01-31-2017 09:20 AM In reply to

    Re: writing values from a multiple-selection list box to another control

     Hi Catharine,

     

    Can you please attach the InfoPath form or a print to help us target your issue?

     

    Thanks,

    Ken 

    Kenneth Kerr
  • 01-31-2017 09:31 AM In reply to

    Re: writing values from a multiple-selection list box to another control

     Hi,

    Here it is.

    Catharine 

  • 01-31-2017 04:26 PM In reply to

    Re: writing values from a multiple-selection list box to another control

    After you've selected a few, deselect one - does that cause your default to refresh? I have a terrible time w/ defaults that leverage multi-selects, I really think there is a bug in InfoPath as to the event firing when the multi-select control is used. Instead of a default, maybe add a submit rule to populate the field you need the merged value in?
    Hilary Stoupa

  • 02-01-2017 05:05 AM In reply to

    Re: writing values from a multiple-selection list box to another control

     Hi Hilary,

    As ever - a super hero !  Yes when I add nothing happens - but when I delete it populates.  I have moved the double eval into a set value rule, and that seems to work ok.

    Thank you for your advice

    Catharine. 

  • 02-01-2017 07:45 AM In reply to

    Re: writing values from a multiple-selection list box to another control

    Oh good, glad that worked. Yeah, I've had a real issue w/ multi-selects and often find I can use a rule where a default won't work, esp. if this is for something where the field doesn't need to update real-time. :)
    Hilary Stoupa

Page 4 of 5 (73 items) < Previous 1 2 3 4 5 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.