Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / October 2004

Tip: Looking for answers? Try searching our database.

How to access the Display Name property of a dropdown box?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 27 Oct 2004 23:00 GMT
It seems that the main DOM stores the 'Value' property of my dropdown
listbox in the XML (ex: employeeID). How do I also store the 'Display
Name' into the DOM as it's own node? (ex: employeeName)

Follow up question: Can you make the 'Display Name' property a concat
of multiple fields? ex: My data connection for the listbox doesn't
actually have a fullname field, it only has separate firstname and
lastname columns. I'd like to concat them together to show the user the
employee's fullname. AFAIK, my only alternative is to go back and edit
the SQL that returns the data so that a new column exists, then specify
this new column in the Display Name property.
TIA for your time and help.
Greg Collins [MVP] - 28 Oct 2004 01:43 GMT
You will need another node to store the display name. Then add a rule to the drop-down list box that populates that node with the display name when the value changes.

Signature

Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com

It seems that the main DOM stores the 'Value' property of my dropdown
listbox in the XML (ex: employeeID). How do I also store the 'Display
Name' into the DOM as it's own node? (ex: employeeName)

Follow up question: Can you make the 'Display Name' property a concat
of multiple fields? ex: My data connection for the listbox doesn't
actually have a fullname field, it only has separate firstname and
lastname columns. I'd like to concat them together to show the user the
employee's fullname. AFAIK, my only alternative is to go back and edit
the SQL that returns the data so that a new column exists, then specify
this new column in the Display Name property.
TIA for your time and help.
Matthew Blain \(Serriform\) - 28 Oct 2004 07:17 GMT
To concat the values, you'll probably have to do custom XSL. Or custom XML
(have a new node which InfoPath sets which has the calculated value). I
don't have an example of either handy, but they're probably both out there
somewhere. The XSL is pretty straightforward once you understand a bit of
XSL and how to use xd:preserve blocks with InfoPath.

Another way to copy values from your list instead of rules is to use a
default value:
http://tips.serriform.com/CopyDropdownSP1.htm

--Matthew Blain
http://www.developingsolutionswithinfopath.com

You will need another node to store the display name. Then add a rule to the
drop-down list box that populates that node with the display name when the
value changes.

Signature

Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com

It seems that the main DOM stores the 'Value' property of my dropdown
listbox in the XML (ex: employeeID). How do I also store the 'Display
Name' into the DOM as it's own node? (ex: employeeName)

Follow up question: Can you make the 'Display Name' property a concat
of multiple fields? ex: My data connection for the listbox doesn't
actually have a fullname field, it only has separate firstname and
lastname columns. I'd like to concat them together to show the user the
employee's fullname. AFAIK, my only alternative is to go back and edit
the SQL that returns the data so that a new column exists, then specify
this new column in the Display Name property.
TIA for your time and help.
Dave - 28 Oct 2004 21:13 GMT
THANK YOU! The example you included
(http://tips.serriform.com/CopyDropdownSP1.htm) was a great help and it
filled in the missing piece of the puzzle, perfectly. The part that I
hadn't understood was that I could apply a filter when specifying the
value for the extra node. In my particular situation it ended up being:

@emp_name[@emp_id = EmpID]

Where @emp_name and @emp_id come from the secondary data source and
EmpID comes from the main DOM.

Thank you both.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.