Same concept, actually.
Retrieve the value for the drop-down list box from the main data source with
selectSingleNode, then search for the display name in the DOM of your
secondary data source by using the value of the drop-down in a filter in an
XPath expression.
Access the DOM for the secondary data source using
XDocument.DataObjects["<your_sec_data_source>"].DOM
Then use selectSingleNode with your XPath expression and filter to find the
value for the display name.
---
S.Y.M. Wong-A-Ton
Siva said:
Hi Wong,
Sounds ok. Any other smart way to do with scripting ????
:
Correct, so you can easily retrieve the value of the drop-down. If your
drop-down list box is bound to a data source (XML file, database, Sharepoint
list, node in the main data source) you can use the value from the drop-down
list box to search in the secondary data source of your drop-down list box
and retrieve the value of the element or attribute bound to the display name
of the drop-down list box.
So, set up another rule, select the field (for the display name) in your
secondary data source to return AND use the "Filter Data" button on the
"Select a Field or Group" dialog box to tie the field of the drop-down list
box located in the main data source to a corresponding field in your
secondary data source.
It sounds complex, but is fairly straightforward once you get the hang of
it. Let me know if you need more assistance with this.
---
S.Y.M. Wong-A-Ton
:
How to store value and display name of a selected item in dropdown into
separate variables ????
I have dropdown populated with country name as display name and country id
as value. I want to store the selected items name as well as value in
separate variables upon selection in other variables.
As far as my knowledge, we can go to rules use set a field’s value feature.
But with this I can store only value not the display name.
Pls advice.