Do you ever have those moments when you are working on code or something where you lose sight of the simplest things and can't see the forest for the trees?
Yesterday I was writing an agent that would go through documents in a view and place the create date into a field I had created on the existing documents. To make a long story short, I wrote a LotusScript agent that would place the create date into the field and save the document, since I couldn't just save the document and the field update itself.
Anyway, last night I am getting ready for bed, thinking about the script and have one of those moments where you slap yourself upside the head and say, "Duh, why did I write that in LotusScript?" It took 20 lines of code to write what a formula took 1 lines of code: FIELD CreateDate := @Date(@Created) - that was it!
I find myself frequently trying to take the most simple task and make it so difficult.
However, I did learn something in LotusScript, so it isn't all bad. Plus the LotusScript code would come in handy for scheduling the agent to run on the server, rather than the UI.
No comments:
Post a Comment