Hello!
I am trying to add some code so it can be triggered after a field(within a repeating section) is changed. but it only gets trigered for the first row and not the rest of them. below is what I have so far
public void COUNT_1MM_Changed(object sender, XmlEventArgs e)
{
//create navigator for count fieldXPathNavigator COUNT_1MM = MainDataSource.CreateNavigator();
COUNT_1MM = COUNT_1MM.SelectSingleNode(
"/my:myFFIM_base_table/my:Species_Records/my:SpeciesGroup/my:GROUP_1MM/my:GROUP_1MM_sub/my:COUNT_1MM", NamespaceManager);
//create navigator for Species IdXPathNavigator SPECIES_ID = MainDataSource.CreateNavigator();
SPECIES_ID = SPECIES_ID.SelectSingleNode(
"/my:myFFIM_base_table/my:Species_Records/my:SpeciesGroup/my:SPECIES_ID", NamespaceManager);
if (SPECIES_ID.ToString() == "999990" && COUNT_1MM.ToString() != "" && COUNT_1MM.ToString() != "0")// check if species selected is NOSP and and count field is not blank and not 0
{
//if above statement is true then print this messageMessageBox.Show("NOSP (No fish collected) was indicated. Number of fish should be 0.");
COUNT_1MM.SetValue(
"0"); // set the count value to 0
}
any help would be greatly appreciated. Thanks.