Monday, June 06, 2005

On a less personal note

I've found my missing data. In celebration of this discovery, I microwaved my leftovers and filled my mug with water. Kinda a sad commentary on my life there, isn't it?

I'm trying to figure out how to explain the bug in Lotus Notes that caused 2 days of debugging. I don't want to get too geeky or too technical. Oh well, here goes.

I had a form that contained computed subforms. The one computed subform contained a formula to determine what subform to show based on the request type. This should work, but when it came to saving the form online, it wasn't saving all of the fields. My first hint should've come when I noticed some of the data being saved was from a different subform than the one used to enter the data. When I look at something like that and think "hmmm, that's odd," I should really investigate further. Nope, I just figured it was one of Notes' little intricacies.

Today I caved and went to search the online user forums. And I learned that on submit of a webform, it recalculates any computed subforms. Since the type of account requested doesn't change, I wrongly assumed that the computed subform would evaluate the same at this point. So I went back and looked at the code used to determine the subform to be used. The default selection was the modification subform rather than creation. And the mysterious fields I noted earlier came from the... modification subform.

So, I put the two missing fields onto the modification subform as hidden fields and...voila, data gets saved. Two days of development time wasted on this. I'm still not sure how it re-evaluates the subform to anything other than what it should be, but it does. That investigation gets to wait until I've completed this project and have time to go back and really poke around in the code. I'm still hoping for it to be another Notes intricacy that can't be explained in any other way. That's always fun to document for other developers.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home