Still having an issue with the lookups.... - InfoPath Dev
in

InfoPath Dev

Still having an issue with the lookups....

Last post 11-14-2007 01:39 PM by Ed Rodman. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 11-14-2007 08:10 AM

    Still having an issue with the lookups....

    I tried using a dropdown listbox and set its data connection properties to the secondary data source (which is a 2 field query). Now, I get all the account numbers in the drop down and I want the account name to populate in the account name text box. I tried a rule but I get the first value of the account name field of the query...So, I know it's kind of working....but not pointing to the right record. So, again, the drop down listbox is populating correctly with the query account id values, but when I select one, its populating the account name with the value of the first record of the query.....

    Any ideas as to what I am doing wrong? Thanks

  • 11-14-2007 09:43 AM In reply to

    Re: Still having an issue with the lookups....

    Hi Ed.

    So your drop down is working properly? You can use the Value and Display name at the bottom of the properties to set it to display one field while containing another.

    Are you using a filter on your set field value action? For Field: you would lookup the field in your view which should contain the name. For Value: you would click on the function button (FX)

    Then Insert Field or Group

    Then use the drop down at the top to select your secondary data source

    Select the account name field and then select filter in the lower left of the window.

    Add a filter

    Accountnum = your drop down field in your view

    Ok everything

    This will return the account name which the account number = what was selected.

    Hope that helps

  • 11-14-2007 12:57 PM In reply to

    Re: Still having an issue with the lookups....

    Clay,

    What you described I actually got to work, but its not what I am really looking for. I have two fields RELM ID: and RELM NAME (Account ID and Account Name),   I want to select the RELM ID value from the drop down listbox (which works) and have the RELM NAME pop into the RELM NAME test box. I'm getting the value of the first item in the secondary data connection for the RELM NAME. Its sitting on the first record. I've enclosed the XPath code from the Rule and action.  I think its close.

     

    xdXDocument:GetDOM("RELM_LOOKUP 2")/dfs:myFields/dfs:dataFields/d:RELM_LOOKUP/@RELM_NME[../@RELM_ID = current()/my:sec_RELM/my:txt_RelmNumber]

  • 11-14-2007 01:33 PM In reply to

    Re: Still having an issue with the lookups....

    Is your drop down bound to a repeating field? I thought your field was in the Main DOM and that you were using the dc for the values.  For that you would not need the current().

    Have you tried this with a field in your main data source? If you use the standard UI you would not get the current in the filter.

    Typically you would use a field in your form and then use it as the filter value for either list.

  • 11-14-2007 01:39 PM In reply to

    Re: Still having an issue with the lookups....

    CLAY...

     

    I GOT IT TO WORK. I WANT TO DOCUMENT WHAT I HAVE DONE AND THEN I WILL LET YOU KNOW.

    THANKS FOR YOUR PATIENCE AND HELP.

    ED

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