Thanks! That works!
Now, on load, my form strips the ugly characters.
Here is the completion of it, in case anyone else is having a similar problem:
public void FormEvents_Loading(object sender, LoadingEventArgs e)
{
//repeating field requestor
XPathNavigator Requestor;
//repeating field functional
XPathNavigator Functional;
//repeating field programdirector
XPathNavigator programDirector;
//declare datasource (this is an xml datasource to a specific sharepoint list)
DataSource ReadyForCCB = this.DataSources["Ready for CCB"];
XPathNavigator domNav = ReadyForCCB.CreateNavigator();
XPathNodeIterator rows = domNav.Select("/xml/rs:data/z:row", NamespaceManager);
//iterate through the rows of the datasource
while (rows.MoveNext())
{
//store the value of requestor in the current row
Requestor = rows.Current.SelectSingleNode("@ows_Requester", NamespaceManager);
//store the value of functional in the current row
Functional = rows.Current.SelectSingleNode("@ows_IMO_x002f_PM_x0020_Name", NamespaceManager);
//store the value of programdirector in the current row
programDirector = rows.Current.SelectSingleNode("@ows_Program_x0020_Director", NamespaceManager);
//set the value of the fields with the chars stripped
Requestor.SetValue(RemoveChars(Requestor));
Functional.SetValue(RemoveChars(Functional));
programDirector.SetValue(RemoveChars(programDirector));
}
}
public string RemoveChars(XPathNavigator x)
{//function to strip the characters.
//set the value of substring equal to that of the XPathNavigator being passed in, i.e., Requestor, Functional, programDirector
string substring = x.Value;
//strip the chars before and including the #
substring = substring.Substring(substring.IndexOf("#") + 1);
//return the stripped value
return substring;
}
Thanks again for your help, Hilary.