How can I save the ID from a combo box? - InfoPath Dev
in

InfoPath Dev

How can I save the ID from a combo box?

Last post 03-02-2011 03:31 AM by troy23. 17 replies.
Page 2 of 2 (18 items) < Previous 1 2
Sort Posts: Previous Next
  • 02-25-2011 09:35 AM In reply to

    Re: How can I save the ID from a combo box?

    Thanks for that - it is now working. Although the logic seems a bit odd Column1[EmployeeID = cboNames] I presume this says select column1 from the combo box (display text) where the employee id (value ID) of the combo box equals the combo box (or some part of the combo box) Can't understand how that works, but it seems to. As for them typing in a value - I assume as it is a dropdown they can only select what is available. But if they did type something in then the same principal would apply - I would need to select whatever has been typed. Thanks
  • 02-25-2011 09:47 AM In reply to

    Re: How can I save the ID from a combo box?

    Your post said "Combo Box" -- so I assumed you were using a combo box control (which allows the user to select or type in an entry).

    It may help you understand the XPath filter to think of it this way: Your secondary data source of PopulateEmployees has a lot of rows. You need to get a value from the Column1 field for one of those rows. How can you tell InfoPath which row it is? By telling it the EmployeeID for the same row. Your Main Data Source has a field that has an EmployeeID in it. The XPath says "Please provide me with a Column1 value from this row, the row where EmployeeID is equal to the ID of the item selected by my user"

    Hilary Stoupa

  • 03-02-2011 03:31 AM In reply to

    Re: How can I save the ID from a combo box?

    Thanks for the reply Column1[EmployeeID = cboNames] So by referring to cboNames I am referring to the ID value itself. InfoPath automatically takes the first item of the combo box as the ID in this reference. That was what was confusing me. I will try to use as little code as possible as that seems to be the general thinking here. However, I am confused as to when I should use code, be it VB or XML. If most things can be done without code then in what circumstances do we need to start writing any kind of code?
Page 2 of 2 (18 items) < Previous 1 2
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.