Dropdown data in InfoPath Form showing incorrectly on SharePoint - InfoPath Dev
in

InfoPath Dev

Dropdown data in InfoPath Form showing incorrectly on SharePoint

Last post 01-09-2020 02:06 PM by Hilary Stoupa. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 01-08-2020 11:29 AM

    Dropdown data in InfoPath Form showing incorrectly on SharePoint

    Hello, I have a dropdown list in my InfoPath that has site locations. It is also tied to email for each location so they receive a notification. For example, the datasource that populates the Ship Plant field is in SharePoint and looks like this: ID Plant LocType Email 301 000-Test Test Location [email protected] My form is attached. In the form, I have the Plant set to Display, but the Value is equal to the Email address. When I promote the field to SharePoint, it displays the Email and not the Plant # I don't see an option in the promote section to select what to display. Help?
  • 01-08-2020 12:34 PM In reply to

    Re: Dropdown data in InfoPath Form showing incorrectly on SharePoint

    Attaching your screenshot to this post, and closing the other thread - you can always just add a reply to your thread with each additional file.
    Hilary Stoupa

  • 01-08-2020 12:38 PM In reply to

    Re: Dropdown data in InfoPath Form showing incorrectly on SharePoint

    This gets a little tricky with a hardcoded dropdown. If we put this data in a secondary data source instead, it gets a lot easier. I'd suggest you create a SharePoint List for this data - it would have two columns - one for email, one for name. Then you can add a data connection to that list, and use it for your dropdown, with the email for the value, and the name for the display. Finally, you can add another field to your form (doesn't have to display on the form) that you use a default value for - basically, the default would be the display name for the selected email - and you'd promote THAT field. It sounds more complicated than it is -- if you create the list and add a data connection to it, and re-attach your template, I can help you with the new field and the default value. :-)
    Hilary Stoupa

  • 01-08-2020 01:56 PM In reply to

    Re: Dropdown data in InfoPath Form showing incorrectly on SharePoint

    Yes Hilary, I already had the SP list and had the Ship field set with a data connection and email as Value and Plant # as Display.
  • 01-08-2020 01:58 PM In reply to

    Re: Dropdown data in InfoPath Form showing incorrectly on SharePoint

    The hidden field...tried various formulas but none are getting me the result...
  • 01-08-2020 02:30 PM In reply to

    Re: Dropdown data in InfoPath Form showing incorrectly on SharePoint

    oh, and sorry, here's the latest xsn file...i played with another rule for the hidden field
  • 01-08-2020 04:08 PM In reply to

    Re: Dropdown data in InfoPath Form showing incorrectly on SharePoint

    I didn't realize the field in question was in your repeating table - your hidden field also needs to be in the repeating group, because if there are 15 rows, you might have 15 different values for the SHIP Plant, right? I've attached an updated file here - save it locally, right click and select Design to open in InfoPath Designer. The formula, once your field is inside your repeating data source, would be: xdXDocument:GetDOM("MDList2")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Plant[../d:Email = current()/../my:Ship]
    Hilary Stoupa

  • 01-09-2020 02:03 PM In reply to

    Re: Dropdown data in InfoPath Form showing incorrectly on SharePoint

    The InfoPath Whisperer...you never cease to amaze me. Your solution has my form working like a charm. Is there a survey I can fill out to let your employer know how amazing you are and how well you know your stuff? Thanks so very much! 10 Star Service...
  • 01-09-2020 02:06 PM In reply to

    Re: Dropdown data in InfoPath Form showing incorrectly on SharePoint

    Glad you have it working & thanks for the compliments - have a great day!
    Hilary Stoupa

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