Populating value based on droplist selection in data connection - InfoPath Dev
in

InfoPath Dev

Populating value based on droplist selection in data connection

Last post 05-22-2014 09:56 AM by TomRenfro. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 05-19-2014 01:14 PM

    • TomRenfro
    • Top 75 Contributor
      Male
    • Joined on 09-29-2011
    • Oklahoma City, OK
    • Posts 134

    Populating value based on droplist selection in data connection

     Pretty sure this has been answered before, but for the life of me I can't find it.

     I have a droplist of facility names pulled from a SharePoint list.  In the data connection that's returned, the display name for the control is the facility name, corresponding to column2 in the SP list.  The actual value is the business unit, a unique numeric value that corresponds to the title column in the list.  My issue is when the facility is selected, I would like the business unit field on the form to display the corresponding value.  My rule on the droplist is currently set to set the BU field when the field changes to the value of the title column in the data connection.  However, when I test this, I always get the value of the first entry in the list, no matter what I'm choosing.

     What am I missing?

  • 05-22-2014 07:52 AM In reply to

    • TomRenfro
    • Top 75 Contributor
      Male
    • Joined on 09-29-2011
    • Oklahoma City, OK
    • Posts 134

    Re: Populating value based on droplist selection in data connection

     Posted this on Monday, still no answer?

  • 05-22-2014 08:28 AM In reply to

    • RaYvA
    • Top 100 Contributor
    • Joined on 05-09-2013
    • Melbourne, Australia
    • Posts 86

    Re: Populating value based on droplist selection in data connection

     Hi, just trying to work out what you require here:

    • You have drop down list attached to a data source
    • The drop down list has a 'Display Name' (which is Facility Name) and a 'Value' (which is Business Unit "Unique Value") from that data source
    • The Business Unit is to obtain the value of the drop down list?

    I'm probably tired, but am I missing something here? The default value of Business Unit is ../my:Faculty

     Attached simplistic form

  • 05-22-2014 08:32 AM In reply to

    • RaYvA
    • Top 100 Contributor
    • Joined on 05-09-2013
    • Melbourne, Australia
    • Posts 86

    Re: Populating value based on droplist selection in data connection

     No need to be narky about delays in reply, this is a community forum and everyone will do their best to answer anything within the knowledge they possess, assuming obviously that everyone wants to share their insights, and not demand answers to their pressing needs.

  • 05-22-2014 08:41 AM In reply to

    • TomRenfro
    • Top 75 Contributor
      Male
    • Joined on 09-29-2011
    • Oklahoma City, OK
    • Posts 134

    Re: Populating value based on droplist selection in data connection

    Not narky at all, this forum is typically monitored by Qdabra developers and business analysts.  They are the experts in this field, and I've come to depend on quick useful answers without needing to pay for support, particularly for questions that might've been addressed multiple times.

    That being said, the structure I spoke of is loaded via a data connection from a SharePoint list.  The control is populated with values from columns in the list.  An example would be a display value of "My General Hospital", the business unit corresponding value would be "100".  I want to populate a separate textbox with the business unit value from the droplist control.  What's happening is no matter what I pick, the value is the first value in the list.  It probably has something to do with using preceding-sibling, which I've never had much luck with.

    Does this make more sense?

  • 05-22-2014 09:15 AM In reply to

    • RaYvA
    • Top 100 Contributor
    • Joined on 05-09-2013
    • Melbourne, Australia
    • Posts 86

    Re: Populating value based on droplist selection in data connection

     As I said this is a community forum.

    If you have purchased a Qdabra product and posted your question in the appropriate forum I'm sure they will get back to you within the agreed and contracted service hours.

    They (Qdabra staff), and others here, are experts in their respective fields, and none of the hours spent in supporting each other is either cheap nor free, you assume that you will get an answer "without needing to pay for support" whether it has been answered before is insulting to most on this site, well me to at least.

    Might I suggest that you brush up on your ability to search the web, there's a thing called Google that has been supplying answers for years, without relying on charity of others experience prior to posting questions in these community forums.

    As to your reply, you neglected to mention that your required assistance with a formula with a "preceding-sibling" precedence, which would lead me to believe that you were attempting to gather a value of a drop down list embedded in a table or repeating section.

    Good luck with that, dependency is a ***.

  • 05-22-2014 09:26 AM In reply to

    • TomRenfro
    • Top 75 Contributor
      Male
    • Joined on 09-29-2011
    • Oklahoma City, OK
    • Posts 134

    Re: Populating value based on droplist selection in data connection

     Look, I've been on this forum for a number of years, and yes I've paid for support in the past.  I really don't need a lecture, just hoping somebody else has dealt with this issue.  I know the Qdabra staff quite well, and don't want to waste their time.

    I know how to search the web, sometimes time dependency on projects takes precedence, I'm not a newbie, and I don't appreciate your condescending tone.  I know you're trying to help, but this doesn't help.

    If you don't know the answer, just don't reply.

     

  • 05-22-2014 09:34 AM In reply to

    Re: Populating value based on droplist selection in data connection

    TomRenfro:
      My issue is when the facility is selected, I would like the business unit field on the form to display the corresponding value.  My rule on the droplist is currently set to set the BU field when the field changes to the value of the title column in the data connection.  However, when I test this, I always get the value of the first entry in the list, no matter what I'm choosing.

    Usually when I see this the issue is that we need to be using "current()" somewhere and are not. So - can you open up the formula editor for the value you are using for the rule, and click Edit XPath and paste the XPath in a reply?

    Hilary Stoupa

  • 05-22-2014 09:42 AM In reply to

    • TomRenfro
    • Top 75 Contributor
      Male
    • Joined on 09-29-2011
    • Oklahoma City, OK
    • Posts 134

    Re: Populating value based on droplist selection in data connection

     Knew it was something like either current() or preceding-sibling.  Here's the XPath expression in the rule:  xdXDocument:GetDOM("INTEGRIS Facilities")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Title[../d:Column2 = xdXDocument:get-DOM()/my:MarketingBrief/my:Department/my:BusinessName]

    Thanks Hilary.

  • 05-22-2014 09:56 AM In reply to

    • TomRenfro
    • Top 75 Contributor
      Male
    • Joined on 09-29-2011
    • Oklahoma City, OK
    • Posts 134

    Re: Populating value based on droplist selection in data connection

     I've got it Hilary.  Again, trying to overthink it.

     Thanks.

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