Microsoft
Software
Hardware
Network
Question : How to populate multiple infopath form fields with values extracted from a SharePoint list when triggered by a dropdown selection
Hi SharePoint & Infopath experts,
Context:
1) I created a custom list in MOSS with 3 fields(column):
Name, City, Province
with multiple prefilled values(all text).
2) I created an infopath form(form service) with corresponding fields(
Name(
dropdown),
City(
text),
Province
(text)) as above to try to fill them out when users select the dropdown
Name
field.
3) I was able to create a Data Connection called: CustInfoListConn to the SharePoint List, and have the Name(dropdown) field in my infopath form filled up with Name values of the SharePoint List.
My Question:
How can I write the required C# code in VSTA in following method:
public void NameDropdown_Changed(objec
t sender, XmlEventArgs e)
{
// I know following code can help me to grab the value(ID) of the selected SharePoint Name field
String NameID = CreateNavigator().SelectSi
ngleNode("
/my:myFiel
ds/my:Name
Dropdown",
NamespaceManager);
// but I don't know how to grab the values of City & Province of the selected list items, so that I can use SetValue() method to set their value accordingly, anyone can help to fill up the remaining puzzle?
}
Thank you,
-Rick
Answer : How to populate multiple infopath form fields with values extracted from a SharePoint list when triggered by a dropdown selection
I figured it out myself by using XmlDocument object's method: SelectSingleNode.
Random Solutions
How can I parse the following string, store it in a variable and then use those variables to populate some txt fields?
Word 2002/xp: Error Message: "Run-time error '4248'; 'This command is not available because no document is open.'"
Setting msExchMailboxSecurityDescr
iptor with VB.NET
Error string in catch block?
String manipulation - SLB FP Equity --> SLBP.PA
Domino Web Site Rule - Redirection
Sharepoint Survey: Clicked 'No' to 'Show user names while creating the survey! Is there a way to turn the feature back on to see the names again?
Export Access 2010 Report to CSV with Headers?
AS3 tween multiple arrows along a path
Virtual Memory