Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / November 2005

Tip: Looking for answers? Try searching our database.

Infinite Loop To OnAfterChange

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Morse - 28 Nov 2005 22:29 GMT
Hello,

I am trying to create a non trusted IP solution that records the XPath for
any node the user may have changed while being worked on.

I have script on the OnAfterChange event that is supposed to record the
XPath in a seperate node which will contain all the users changes.

However when writing to this node that is storing all my changes it appears
I get into an infinite loop with an error poping up saying 'The number of
call to the OnAfterChange event for single update in the data exceeded the
maximum limit'.

Even if I put an if statement in the OnAfterChange event to exit if this
this change was cuased my my storing of the Xpath I still see the message
once but it does record my change.

Any ideas on how to get around this?
Franck Dauché - 28 Nov 2005 22:47 GMT
Hi Michael,

Are you using:
if(eventObj.IsUndoRedo || "Insert" != eventObj.Operation)
return;

at the beginning of your OnAfterChange?

Regards,

Franck Dauché

> Hello,
>
[quoted text clipped - 14 lines]
>
> Any ideas on how to get around this?
Michael Morse - 28 Nov 2005 22:59 GMT
I wasn't but I just tried it and it is still poping the errorMsg but then it
does record the XPath to the node that changed in my other node.

> Hi Michael,
>
[quoted text clipped - 26 lines]
> >
> > Any ideas on how to get around this?
Michael Morse - 28 Nov 2005 23:01 GMT
Franck,

I am in dier need of anything you can thing off to get this solution to
work.  I'm supposed to insall the prototype tomorrow.

> Hi Michael,
>
[quoted text clipped - 26 lines]
> >
> > Any ideas on how to get around this?
Michael Morse - 28 Nov 2005 23:25 GMT
Franck,

I got it.  I was setting my flag after updating the the recordingNode.. I am
now able to exit the funtion when needed.

Thanks for the help.

> Hi Michael,
>
[quoted text clipped - 26 lines]
> >
> > Any ideas on how to get around this?
Franck Dauché - 28 Nov 2005 23:29 GMT
OK great, I am glad it is working!
Let me know if you need anything else.

Good luck for tomorrow...

Franck

> Franck,
>
[quoted text clipped - 33 lines]
> > >
> > > Any ideas on how to get around this?
Michael Morse - 28 Nov 2005 23:51 GMT
Franck

My InfoPath form has this data structure for me to record my changes.

XPathChanges > XPathChange > XPath

XPath Changes is a group and XPathChange is a reapting group and XPath is
the first field within that group.

It doesn't appear that when the form opens there is an XPathChange node for
my to clone and begin working with.

Does InfoPath not put one in until the user actually needs it?  How must I
create a node if there isn't one there for me to clone?

> OK great, I am glad it is working!
> Let me know if you need anything else.
[quoted text clipped - 40 lines]
> > > >
> > > > Any ideas on how to get around this?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.