swathip:
Hi,
You can add an on after change event by following the below steps.
1. Go to data source and right click on the repeating group.
2. Click on Programming -> on after change.
3. And write the following code line in the on after change.
If(e.NewValue != e.OldValue && e.OldValue != null)
{
thisXDocument.DOM.selectSingleNode("xpath of change indicator field").text = 1;
}
Hi Swathi,
I think I am almost there. When I change the value, I am getting a runtime error saying "e" is undefined (which I understand is a valid error as I have not defined "e"). How do I define "e"? My code looks like :
function msoxd_my_group2::OnAfterChange(eventObj)
{
If(e.NewValue != e.OldValue && e.OldValue != null) { thisXDocument.DOM.selectSingleNode("../my:field6").text = 1; } // Write code here to restore the global state.
if (eventObj.IsUndoRedo)
{
// An undo or redo operation has occurred and the DOM is read-only. return;
} // A field change has occurred and the DOM is writable. Write code here to respond to the changes.
}