Tag Archive: Development

Stop Using Today in View Selection Formula

During my recent session at Lotusphere, I briefly mentioned NOT using @Today in view selection formula (because it’s a big hit on performance). I didn’t have time to get into possible solutions, but did mention the SelectionFormula property in LotusScript. Some of you asked for more details. Silly me, I had completely forgotten I’d written about it in my first article for Lotus User Group’s Lotus Developer Tips Newsletter.

Please see that article for details! And thanks for attending the session!

IdoSphere Coming Up!

In case you missed my post before Lotusphere, I’ll be speaking at IdoSphere next week. It’s a two-day VIRTUAL event. Two days of sessions not seen at Lotusphere. And in case I wasn’t clear last time, the event is only $35 for the entire event! All sessions are being recorded for later viewing as well. And if you use this special link, and the code IDS2011KB, you can save 10%. I believe the agenda and abstracts are going up soon, if they aren’t already, go to http://idosphere.com to check it out.

TLCC Developing XPages Course Review

I recently completed the TLCC Developing XPages course. I had completed a TLCC course several years ago and felt the format was a good one for learning. The XPages course was no exception.

The course consists of 9 modules, starting with an overview and then jumping right into creating your first XPage. Controls, Views and Documents, Formatting and Styles, Javascript, Advanced Techniques, Custom Controls and changes in versions are all covered. The course begins at the very beginning. No XPages experience is required. However, the format is such that it is easy to skip ahead if you already know bits and pieces. The basic stuff is covered very well, building you up to each new skill. The text portions of the lessons are well balanced with activities and screen shots. I am definitely a visual learner and a do-er rather than a reader. This course is well suited for both. If you are a text learner, the information is there in the text. However, if you are a doer, you can skip the text bits and still understand and complete the activities.

I also liked the additional of links for more information in certain spots. Rather than bog down the course with “advanced” or tangental information at that point, there were links for those that like to go down the rabbit hole.

The course itself is an NSF and is self-paced. That works well for some, not so well for others. You need to know that you will stick with it. However, the nice thing is that the NSF is always there, for whenever you have a few moments to spare and want to learn. Since it’s an NSF, you can easily keep it local and refer to it whenever is convenient for you. Additionally, (and somewhat obviously) the course is a great option for those that can’t get out of the office or travel to course providers.

One additional feature I liked in the format was that the instructions for the activities were on the same page that I was working on, so I didn’t have to flip back and forth. Typically, that is my complaint of “electronic” learning, I like to have the instructions in front of me as I work, so alternating screens tends to irritate me. This wasn’t an issue here.

TLCC also provides forums for the “class participants” should you have questions. I didn’t find myself with any questions, so didn’t take advantage, but is a nice addition to the course.

The only thing I felt was missing was the “Don’t do this in thre real world” type of information. While something may be shown a particular way for the sake of learning it, it is often not the way you would actually implement it. I would have liked to see more of those types of warnings.

And speaking of warnings, anything teaching XPages should have a big yellow label telling you to shut off Skype before trying to start the local HTTP task. I spent a while completely baffled as to why the very first thing I was asked to do wasn’t working.

Overall, I felt this was a great way to learn XPages and look forward to XPage Development 2 from TLCC.


Disclosure:
Obtained From: TLCC for review
Payment: Free

The Hack-tastic Hookup

So, the other day, I blogged about a problem with ComputeWithForm in LotusScript. Many of you feel that ComputeWithForm was the hack, rather than the workarounds, which is fine and dandy. However, if you have an application that already uses ComputeWithForm and you’re having issues, head over to Julian’s blog to get the tool he created to help find what is causing the failure.

An interesting note, I used the tool and found that I was getting an error on a field that had the following (admittedly poorly written) @Formula in input translation: @Date(@ThisValue). Of course, the formula should have been: @If(@thisvalue = “”; “”; @Date(@ThisValue)). However, the first formula still worked on the front-end document. If the field was blank, the doc still would refresh and save without error. BUT, if the field was blank, it was causing ComputeWithForm to fail. I was able to discover that, thanks to Julian’s ComputeWithForm tool.

My original problem had nothing to do with the field I wanted recalculated, but another field altogether.

Thanks Julian!

Need Some Hack-tastic Help

So I’ve got a problem. Apparently I am not the only one with this problem, nor is it a new problem. That being the case, I wondered if anyone had a more elegant (aka less hackish) solution.

I’ve got a scheduled agent using LotusScript, specifically using the “ComputeWithForm” method to (hopefully) recalculate computed fields. I could swear that this agent used to work, and now does not. Coincidentally, someone recently pinged me to see if something was up with 8.5.2 because he noticed the same behavior (that is used to recalculate and now does not) once he upgraded. A little bit of digging, and a lot of bothering people (thanks Julian!) discovered this blog post from Duffbert (whom I would have bothered, if he wasn’t on vacation!) showing that this is an iffy proposition and has been since at least 2004!

Two workarounds are stated, the first being ToolsRefreshAllDocs, which unfortunately, does not work for me in this case since I get an error about too many documents.

The second workaround is to have the LotusScript agent perform the calculation itself (rather than refreshing the field calculation on the document).

I think both of these sound pretty hack-tastic.

All the other solutions I can come up with are front-end/UI methods and therefore won’t work in a scheduled agent. I supposed I could write a front-end agent and just wake up every morning at 3AM to run it manually.

Anyone else out there run into this? Have a better solution?

Older posts «