| | |
Copy Display name of a drop down box
Please support our XML, XSLT and XPATH advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2008
Posts: 2
Reputation:
Solved Threads: 0
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
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
•
•
Join Date: Jun 2008
Posts: 2
Reputation:
Solved Threads: 0
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
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
![]() |
Similar Threads
- trojans wont let me connect to internet (Viruses, Spyware and other Nasties)
- Please help me :"login form use drag and drop toolbox" ! (C#)
- Network cable is un-plugged! No it isn't. (Networking Hardware Configuration)
- Cannot View Certain Menus on Websites (Web Browsers)
- urllogic, downloader-va??? (Viruses, Spyware and other Nasties)
- help with hjt and vx2/urllogic (Viruses, Spyware and other Nasties)
- help with hjt and vx2/urllogic (split from http://www.daniweb.com/techtalkforums/showthread.php?t=18540&page=1&pp=15) (Viruses, Spyware and other Nasties)
- 213.159.117.130 trojan.. help!! (Viruses, Spyware and other Nasties)
- Revolutions of Spyware: The Art of Spyware (Viruses, Spyware and other Nasties)
Other Threads in the XML, XSLT and XPATH Forum
- Previous Thread: WordMl code
- Next Thread: avoid self closing tag in the xml file
| Thread Tools | Search this Thread |
api blogger blogging code delete development dynamiccreationofnvariablesinxslt error firstthreecharacterofastringrequired flipbook gdata google html include java link linspire linux microsoft news node openoffice overwrite precedence programming rss standards swf template transform variable w3c web xml xmlnotloading xmlonserver xsl xslt





