Copy Display name of a drop down box

Please support our XML, XSLT and XPATH advertiser: Intel Parallel Studio Home
Reply

Join Date: Jun 2008
Posts: 2
Reputation: brittaink is an unknown quantity at this point 
Solved Threads: 0
brittaink brittaink is offline Offline
Newbie Poster

Copy Display name of a drop down box

 
0
  #1
Jun 27th, 2008
Hi,
I am using Microsoft Infopath to try and create a front end for a access database. I have a data source which stores an id number for the customer. This id number relates to a secondary data source called tblUsers. the id field then relates to the users forename, surname, email address etc. When the customer id is selcted in a drop down list box, the email address is shown in the box using the secondary data source.

What I need to do is use the display name of the drop down box, not the value, to populate another expression box. I have the following Xpath. Does anyone know where I am going wrong.

xdXDocument:GetDOM("tblUsers")/dfs:myFields/dfs:dataFields/d:qryAllUsers/@email1[xdXDocument:GetDOM("tblUsers")/dfs:myFields/dfs:dataFields/d:qryAllUsers/@ID = dfs:dataFields/d:tblOrders/@_customerid]

Please Help
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1
Reputation: skulk543 is an unknown quantity at this point 
Solved Threads: 0
skulk543 skulk543 is offline Offline
Newbie Poster

Re: Copy Display name of a drop down box

 
0
  #2
Aug 12th, 2008
Hi.

I am attempting to do the same thing in Infopath right now (trying to populate fields using a secondary source's display name rather than value) and have seen you ask this question on another website. Did you end up having any luck solving this problem?

Thanks
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 2
Reputation: brittaink is an unknown quantity at this point 
Solved Threads: 0
brittaink brittaink is offline Offline
Newbie Poster

Re: Copy Display name of a drop down box

 
0
  #3
Aug 13th, 2008
Hi,
The answer was given to me on one of the other forums. There is a Microsoft article which explains it in more detail, but I can't remember where it was sorry. Basically the way I had to do it was create a text box that was not linked to any of the datasources eg. my:{new box}, then I set up a rule on the drop-down box. This rule always applies, it is to set a fields value. Set the field value for my:{new box}

Value = (from your secondary data source holding th id and display) the display value wanted. Then before you click OK Click Filter Data in the bottom Left.

In this screen select the first field as your index "is equal to" the value from your primary source that is in a drop down box.

This should do the trick and your XPath should now look something like this:
@{display}[@{Value}=@{Primary}]

I know this is not a great way of explaining things. Please excuse my dislexic way of explaining.

If you want to you can contact me brittaink112@scampton.raf.mod.uk and I may be able to email you some screen shots.

Hope this helps

Keith Brittain
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the XML, XSLT and XPATH Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC