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 / December 2005

Tip: Looking for answers? Try searching our database.

Different name displayed and value created from XML source

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Johan Nilsson - 05 Dec 2005 09:58 GMT
I have what I assume is a newbie problem when I have created a cascading
repeating table from an XML source. I want one value to be displayed and
another registered when choosing that option.

For example, you choose 'Value1' from a dropdown list called
'FirstDropDownList' and based on that choice you your options get populated
in the second dropdown list. In this list I would like to see one value
displayed and another registered. At the moment one of the rows in my xml
document looks something like this:

<FirsDropDownList="Value1" SecondDropDownList="ABC123" />

I can see in InfoPath that you can choose a value and a display name but
when chosen I can only choose SecondDropDownlist for both display and data
value.

How do I rewrite my XML source to be able to choose different values and
displaynames?

Thnks in advance
S.Y.M. Wong-A-Ton - 05 Dec 2005 13:15 GMT
Your XML must have more than one element and/or attribute in your repeating
nodes to be able to set a value that differs from the display name.

Try the following structure:
<dds>
 <dd1 FirstDropDownList="Value1">
   <dd2 id="123" SecondDropDownList="ABC123" />
   <dd2 id="345" SecondDropDownList="ABC345" />
 </dd1>
 <dd1 FirstDropDownList="Value2">
   <dd2 id="678" SecondDropDownList="ABC678" />   
 </dd1>
</dds>

Settings for the first dropdown:
Entries: Select "dd1" node
Value and display name are automatically set to @FirstDropDownList since
"dd1" has only 1 attribute (FirstDropDownList).

Settings for the second dropdown:
Entries: Select "dd2" node and filter data on FirstDropdownList = <field in
the main DOM representing first dropdown list on InfoPath form>
Value: Select "id" under "dd2" node
Display name: Select "SecondDropDownList" under "dd2" node

You could also use a structure like the following:
<dds>
 <dd1 FirstDropDownList="Value1">
   <dd2 id="123"><SecondDropDownList>ABC123</SecondDropDownList></dd2>
   <dd2 id="345"><SecondDropDownList>ABC345</SecondDropDownList></dd2>
 </dd1>
 <dd1 FirstDropDownList="Value2">
   <dd2 id="678"><SecondDropDownList>ABC678</SecondDropDownList></dd2>
 </dd1>
</dds>

Or one like:
<dds>
 <dd1 FirstDropDownList="Value1">
   <dd2><id>123</id><SecondDropDownList>ABC123</SecondDropDownList></dd2>
   <dd2><id>345</id><SecondDropDownList>ABC345</SecondDropDownList></dd2>
 </dd1>
 <dd1 FirstDropDownList="Value2">
   <dd2><id>678</id><SecondDropDownList>ABC678</SecondDropDownList></dd2>
 </dd1>
</dds>

Does this work for you?

Regards,
S.Y.M. Wong-A-Ton

> I have what I assume is a newbie problem when I have created a cascading
> repeating table from an XML source. I want one value to be displayed and
[quoted text clipped - 16 lines]
>
> Thnks in advance
Johan Nilsson - 07 Dec 2005 14:46 GMT
Excellent, this was exactly the information I was looking for.

Much appreciated =)

> Your XML must have more than one element and/or attribute in your repeating
> nodes to be able to set a value that differs from the display name.
[quoted text clipped - 68 lines]
> >
> > Thnks in advance
 
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.