Cascading Drop-down Value not Auto-populating Additional Fields - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Cascading Drop-down Value not Auto-populating Additional Fields

Last post 11-15-2018 07:54 AM by Jacob Russ. 30 replies.
Page 2 of 3 (31 items) < Previous 1 2 3 Next >
Sort Posts: Previous Next
  • 09-13-2018 03:03 PM In reply to

    Re: Cascading Drop-down Value not Auto-populating Additional Fields

    Looks like you may also need to match on country, right? Because the payment terms seem to differ according to country and sales org. However, for matching on just sales org, your XPath looks right.... Are you always getting Net 30? Or whatever the first item in the list is?
    Hilary Stoupa

  • 09-14-2018 09:24 AM In reply to

    Re: Cascading Drop-down Value not Auto-populating Additional Fields

    The reality of the situation is that many of these fields are country driven, since there is a many to one relationship between Country and Sales Org, as you can see by the screenshot displaying so many Puerto Rico Sales Orgs for Latin American countries.  To answer your question, after conferring with another team member, I modified Payment_Terms, Inco_Terms1, Inco_terms2, and Shipping_Conditions for the screenshot, in case there is sensitive Sales Territory information here.  For the sake of this exercise, the values in all columns can potentially vary by country.  I am still hoping that filtering by Sales Org is a viable option?  Or do I need to filter on Country now?

     

    -Jake

    -Jake

    Factum est illud, fieri infectum non potest. (The Onion)

  • 09-14-2018 09:31 AM In reply to

    Re: Cascading Drop-down Value not Auto-populating Additional Fields

    You need to filter on both, I think, looking at your data. You could probably set the country query field in your new list data connection and query that when the user changes the country, in order to only return data pertinent to that country. Then in your XPath for your rules to set field values you could add the Sales Org filter.
    Hilary Stoupa

  • 11-09-2018 12:48 PM In reply to

    Re: Cascading Drop-down Value not Auto-populating Additional Fields

    So...thanks again!  I have been able to successfully auto-populate 4 fields from Sales Org.  Here is the XPath for one of them (Payment Terms):

    xdXDocument:GetDOM("Default-Values")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Payment_Terms[../d:Sales_Org = xdXDocument:GetDOM("Sales_Orgs1")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Title[../d:ID = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:SalesOrg7]]

    Default-Values: SharePoint List

    Payment_Terms: the column in Default-Values which I am populating into the corresponding field in the form

    Sales_Org: the column in the data connection Sales_Orgs1

    Sales_Orgs1: the data connection mentioned above, which also contains a lookup column SOCountryLook, that points to a SharePoint List called Countries (which contains a column called Country)

    SalesOrg7: the field in the form

     

    So...clearly I am not fluent in XPath syntax.  I have 8 more fields I want to auto-populate values for, but off of Country values instead of Sales Org values.  These are all values that can also be found in the Default-Values SharePoint List.

    Here is the XPath for setting the Sales Org from the Country:

    xdXDocument:GetDOM("Sales_Orgs1")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID[../d:SOCountryLook = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:Country4]

    Country4: the field in the form

    Country: the name of the country column in Default-Values (in case that is needed)

     

    Any ideas?  I simply can't seem to make this work...

     

    -Jake

     

    -Jake

    Factum est illud, fieri infectum non potest. (The Onion)

  • 11-09-2018 02:27 PM In reply to

    Re: Cascading Drop-down Value not Auto-populating Additional Fields

    Mind attaching your latest XSN and pointing me to one of the controls with rules where you are having trouble? I do so much better understanding when I have a form to look at. :)
    Hilary Stoupa

  • 11-10-2018 02:06 PM In reply to

    Re: Cascading Drop-down Value not Auto-populating Additional Fields

     Hey Hillary!  :)

     

    I have attached my latest XSN...the control where I am looking to trigger the auto-populating Edoc values is called "Use_Default Edoc_Values".  The first field of 18 that I want to auto-populate is called "Edoc_Delivery_Notes".

     

    Thank you SO MUCH for taking a look!  :)  :)  :)

    -Jake

    Factum est illud, fieri infectum non potest. (The Onion)

  • 11-12-2018 04:34 PM In reply to

    Re: Cascading Drop-down Value not Auto-populating Additional Fields

    So, given your earlier post where you have an XPath for getting the sales org based on the country, would this work for the Payment_Terms (for example): xdXDocument:GetDOM("Default-Values")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Payment_Terms[../d:Sales_Org = xdXDocument:GetDOM("Sales_Orgs1")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID[../d:SOCountryLook = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:Country4]]
    Hilary Stoupa

  • 11-13-2018 09:36 AM In reply to

    Re: Cascading Drop-down Value not Auto-populating Additional Fields

     Your formula contains no errors, but when I change Payment_Terms to Edoc-Delivery_Notes as below, I get the following error:

    "xdXDocument:GetDOM("Default-Values")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Edoc-Delivery_Notes" does not point to a valid location path of a field or group.

    xdXDocument:GetDOM("Default-Values")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Edoc-Delivery_Notes[../d:Sales_Org = xdXDocument:GetDOM("Sales_Orgs1")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID[../d:SOCountryLook = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:Country4]]

     

     They are both in the Default-Values SharePoint list, so I am uncertain what I am doing wrong.

    -Jake

    Factum est illud, fieri infectum non potest. (The Onion)

  • 11-13-2018 10:31 AM In reply to

    Re: Cascading Drop-down Value not Auto-populating Additional Fields

    Your Default Values list doesn't have a field with the XPath you are using. I think /dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Edoc_x002d_Delivery_Notes_x002d_ is the field you want.... copy just the filter (the part with the square braces), use the field selector to pick your field from default values, then just paste the filter expression in. :-)
    Hilary Stoupa

  • 11-13-2018 01:56 PM In reply to

    Re: Cascading Drop-down Value not Auto-populating Additional Fields

    I grabbed the XPath from Edoc-Delivery_Notes in Default-Values, and it looks like this:

    /dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Edoc_x002d_Delivery_Notes

    So, missing the "_x002d_" that you had appended to the end?  (I didn't realize that underscores were acceptable but that hyphens would be replaced here)

    Regardless, I have tried applying both of our versions of the rule to the "Use_Default_Edoc_Values" (checkbox), and also to Country4 (drop down list box) to no avail.

    Note that I have not so far been successful with triggering rules like this from checkboxes, even though that is really what I want to do here if I can...

    -Jake

    Factum est illud, fieri infectum non potest. (The Onion)

  • 11-13-2018 02:14 PM In reply to

    Re: Cascading Drop-down Value not Auto-populating Additional Fields

    My error - didn't realize there were multiple fields that include Edoc Delivery Notes - I grabbed the XPath from the one with "Email" in the name. This formula resolves without errors: xdXDocument:GetDOM("Default-Values")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Edoc_x002d_Delivery_Notes[../d:Sales_Org = xdXDocument:GetDOM("Sales_Orgs1")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID[../d:SOCountryLook = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:Country4]] but I don't know whether that's the issue you are having - when you say you have tried "to no avail" what does that mean? The formula doesn't resolve? The rule doesn't execute? The rule does have a condition to only execute when the target field is equal to true... which based on the checkbox properties, should happen when the checkbox is ticked.
    Hilary Stoupa

  • 11-14-2018 07:12 AM In reply to

    Re: Cascading Drop-down Value not Auto-populating Additional Fields

    Yeah, that's the formula I have been trying to get to work on both the check box as well as the drop-down Country4, to no avail.  :)  Which simply means no value is populated in Edoc_Delivery_Notes when the check box is ticked, nor when a value has been selected from Country4.  The formula resolves fine without any errors otherwise.  I am wondering if the complexity I have implemented, using cascading filters for Country and Sales Org (based on Region and Country respectively) utilizing lookup columns in two different SharePoint list data connections is making it hard for me to connect to the Default-Values SharePoint list for these additional 16 (sorry - not 8, not 18 - all 16 Edoc fields).

    Also, I am able to get Payment Terms, Inco Terms 1, Inco Terms 2, and Shipping Conditions to all auto-populate from Sales Org, but when applying the new formula, I am unable to get default values from Country for some reason.

    xdXDocument:GetDOM("Default-Values")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:Payment_Terms[../d:Sales_Org = xdXDocument:GetDOM("Sales_Orgs1")/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW/d:ID[../d:SOCountryLook = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:Country4]]

    -Jake

    Factum est illud, fieri infectum non potest. (The Onion)

  • 11-14-2018 07:34 AM In reply to

    Re: Cascading Drop-down Value not Auto-populating Additional Fields

    So - just to make sure I understand what you are trying to do - you need to get values from Default Values based on Country and Sales Org? I'm sorry, I'm just super confused at this point about the data relationships. Are you saying you need to get a value from Default-Values where the country matches the country selected in the form or where they also match on sales org? One thing that may help you with the filters is to just drag the secondary data sources onto the form temporarily so you can see what the actual values in the various columns are.... maybe do the same with some of the main DS stuff that is in dropdowns - put text fields on the form so you can see the actual value rather than the dropdown display value.
    Hilary Stoupa

  • 11-14-2018 07:58 AM In reply to

    Re: Cascading Drop-down Value not Auto-populating Additional Fields

    Sorry for the confusion - I originally was getting values from Default-Values based on Sales Org for those four fields (Payment Terms, Inco Terms, etc.), but now everything (those 4 fields, as well as the 16 Edoc fields) needs to be from Country instead.

    "Are you saying you need to get a value from Default-Values where the country matches the country selected in the form?"  Yes

    "...or where they also match on sales org?"  No

    "One thing that may help you with the filters is to just drag the secondary data sources onto the form temporarily so you can see what the actual values in the various columns are.... maybe do the same with some of the main DS stuff that is in dropdowns - put text fields on the form so you can see the actual value rather than the dropdown display value."

    I have read other posts where you have spoken of doing this, and it sounds like something that I need to understand how to do and play with, since I haven't done it before.  Needless to say, I am running out of time on this project and need to deliver it in one week.  :(

    -Jake

    Factum est illud, fieri infectum non potest. (The Onion)

  • 11-14-2018 08:10 AM In reply to

    Re: Cascading Drop-down Value not Auto-populating Additional Fields

    See attached. I've made a guess at the correct filter for setting the edoc notes from the default values. I added your default data source at the bottom of the form - is the Country there text or an ID? I'm guessing it is text.... I put the value of your Country4 field under the dropdown so you can see it - it is going to be an ID. If you also put the data fields from the Countries list on your form (since that is the list the dropdown uses for its values) you'd be able to visually see if there is a country in that list that matches the country in the default values list.
    Hilary Stoupa

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