Mapping 2 fields to the same Sharepoint list column - InfoPath Dev
in

InfoPath Dev

Mapping 2 fields to the same Sharepoint list column

Last post 02-27-2013 07:50 AM by Hilary Stoupa. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 02-26-2013 06:15 AM

    Mapping 2 fields to the same Sharepoint list column

    My form contains several drop-down menus, but I need also give users the ability to enter their own values if it doesn't appear in the drop-down list. I need these "Other" fields to post to the same Sharepoint column as the parent drop-down. I tried doing this using the Infopath-to-Sharepoint-List Tool but when I tested it, only the Other fields got recorded, the data from the drop-downs are just blanks. Is it possible to have to 2 separate fields post data to the same Sharepoint Column?
  • 02-26-2013 07:30 AM In reply to

    Re: Mapping 2 fields to the same Sharepoint list column

    Well - the issue would be that one would likely overwrite the other. Can you attach your mapping file under the options tab to a reply? I'd like to try to manually modify the XPath for your mapping to see if we can make it work that way.
    Hilary Stoupa

  • 02-26-2013 07:39 AM In reply to

    Re: Mapping 2 fields to the same Sharepoint list column

    Sure thing, look at the "CommOrgs" section, it's the last group in the xml. the drop-down menu is my:CommOrgsName and the Other field is my:CommOrgsOtherTxt. You'll see how they're both mapped to the Sharepoint column named "CommOrgs." Thanks for looking into this!
  • 02-26-2013 08:22 AM In reply to

    Re: Mapping 2 fields to the same Sharepoint list column

    Try with this mapping - let me know what happens. I added a filter to both of the mappings so that it won't submit the value if CommOrgsName is blank or if CommOrgsOtherTxt is blank. In your form, can you add logic to make sure that if the user is filling in "other" that the drop down is set to blank? Or if you have other logic in place (i.e. - CommOrgsName = Other if they are filling out CommOrgsOtherTxt) let me know & I can adjust the mapping again. :-)

    If this doesn't do what you need, we can add another mapping to the same list and move the condition up to the repeating group, but this seemed easiest to start with.

    Hilary Stoupa

  • 02-27-2013 06:29 AM In reply to

    Re: Mapping 2 fields to the same Sharepoint list column

    EDIT: I said it produced an error but that was something I messed up. It went through but it's not capturing the Other field, not sure where it's going. What about property promotion? Maybe there's some way to rig that to get the Other field to work if both are present? I'm ultimately hoping to deploy this as a browser-enabled form, so I don't believe filters will work (not sure if this is still true for Infopath 2010). I'll keep messing around with it, thanks for your help with this!
  • 02-27-2013 07:07 AM In reply to

    Re: Mapping 2 fields to the same Sharepoint list column

    I just hit on a possible solution: I just changed the binding of the Other field to connect it to the parent drop-down menu. So that means I have one drop-down menu and one text box with the same field (in this case CommOrgsName). I have conditional formatting set for the Other text box so that it only appears when the user selects "Other" from the drop-down menu. The user can enter their info here and then it gets converted into an extra drop-down menu item. When submitted, it places the new info in the same field with the others.

    See attached image, #1 is first line item, a choice is selected from the drop-down. #2 is an additional table with "Other" selected from drop-down, conditional formatting makes Other text box appear. #3 user writes in new info. #4 once completed, the info displays as part of drop-down menu. #5 both instances appear in same Sharepoint column.

    This is not perfect; the text box pulls the word "Other" from the drop-down menu and users will have to know they can overwrite this text with their own (I may alter the wording to say something like "Other - Please write in here"). But it puts the info in the column I need!

  • 02-27-2013 07:17 AM In reply to

    Re: Mapping 2 fields to the same Sharepoint list column

    Wonderful - glad you have a work around. Have you considered just using a combo box control so users can select or type?

    The issue with XPath filters in IP 2007 browser forms was only on drop down lists where they were not implemented - there was no general restriction on using XPath filtering (i.e., you could use it in expression boxes, or when setting a field's value via rules or defaults). Filtering is now enabled on list boxes in IP 2010 browser forms.

    Hilary Stoupa

  • 02-27-2013 07:30 AM In reply to

    Re: Mapping 2 fields to the same Sharepoint list column

    oh jeez, I didn't know about the combo box! well that makes things a lot easier! Did Infopath 2007 have it? I feel kinda dumb for missing that. But the form I'm building is a recreation of a custom java-driven form, so I'm probably getting tunnel vision in trying to make it look as much like the old form as possible. good to know about filters, I had to remove a lot of them when I found out IP07 couldn't do it in a browser.
  • 02-27-2013 07:50 AM In reply to

    Re: Mapping 2 fields to the same Sharepoint list column

    Oh, don't feel dumb at all. I learned with IP 2003, so I am constantly finding surprises like this. :)

    Combo box was NOT available for Browser IP 2007, but was for Filler.

    Hilary Stoupa

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