PermaLink Computed for Display fields and my moment of Zen.07/22/2008 09:34 AM
Written By : Jess StrattonCategory : Developing
Location : LotusUserGroup.org
You know, I design a certain way and everything works, and I never really thought that the WAY I was designing was a contributing factor in the whole "everything works" bit.

Case in point. For every database I develop, I select my placement of hidden fields at the top or the bottom of the page, usually depending on what the standard is for the organization I'm developing for.

Case in point 2: As most of you know, I'm a Notes client junkie. It's rare for me to do any sort of web developing, but I was that day, so there we are.

I created a $$Return field that would use the parent doc's UNID carried over from another field to form the URL go to back to once the form was submitted. Computed for display, everything looked great, except... no doc ID.

I try everything, until finally I admit to myself that I need to get AWAY from laptop for a bit to think. It had to be something REALLY EASY, as it always is when you tear your hair out.

(I think I should note that perhaps I have been watching a bit too much "Blue's Clues" with Zoë, as I said, "now we sit down in our thinking chair and think....think... .thiiiiiiiiiiink.")

However, I think Steve from Blue's Clues is onto something, as about ten minutes after stepping away from my computer I KNEW what it was.

I walked over, swapped the placement of the $$Return field and the field which pulled in the value of the parent UNID, and it worked beautifully.

Sure enough, it seems that if Field2 picks up Field1's value, then Field1 must be on the form somewhere before Field2. I did note that I can also check "Compute after validation" to make sure it fills in correctly no matter what.

It sounds so easy. Ten years of developing and I'd never made that connection?

How long have I been doing development? Have I really just always been lucky or developed in a way that I never had to make the connection that the way they are placed on the page is the order in which the values will be calculated?

It just goes to show - just when you think you are experienced, it takes one small little field value to show you that there is ALWAYS more to learn!

Has anyone ever had a moment of Zen like that? Can anyone enlighten me some more on ways that computed fields work that really do make sense once you think of them? Let's hear!

Jess


Technorati:
This page has been accessed 206 times. .
Comments :v

1. Jess Stratton08/19/2008 09:52:00 AM


Hi Ed!!
Of course you aren't sounding like a sourpuss, you are exactly right, and I apologize. I'm trying to work on automatically notifying me when people comment, because I'll be honest - sometimes I forget to go back and check, and then say a big fat "doh!!" when the count is up.

Actually, I *didn't* know about the benefits of using UNIDs as "breadcrumbs", and I could have used that last week as for the first time I had to do web programming (gasp) and needed a way to return the user to a parent document after hitting the submit button.

Again, sorry, and thanks for keeping me in line!




2. Ed Lee08/13/2008 04:37:01 AM


Hi Jess,

At the risk of sounding a sour puss I'm assuming my post was of no use to you. If you already knew it then that is fine, a comment to say so would be nice. It just seems a bit alienating when you try and contribute and are met by silence.

Ed




3. Ed Lee07/23/2008 05:49:47 AM


Hi Jess,

I was interested to read UNID's for breadcrumbs. If you are using R6+ then why not use a @while and you can a breadcrumb that will show the user exatactly where they are. Additionally you don't have to worry about UNIDs getting out sync when you copy and past documents. Here's an example:

REM {Get all the documents ancestors and pull the fields we want off them to make some breadcrumb navigation};

parentUNID:=@Text($REF);

titleList := "";
UNIDList:=@Text($REF);

@While( (parentUNID != "") ;
titleList:=@GetDocField(parentUNID;"Title"): titleList;
UNIDList:=@Text(@GetDocField( parentUNID ; "$Ref" )):UNIDList;
parentUNID := @Text(@GetDocField( parentUNID ; "$Ref" ))
);


html:="<a class=\"currentlink" +@Trim(UNIDList) : @Text(@DocumentUniqueID)+"\" href=\"/"+DBpath+"/0/" +@Trim(UNIDList) : @Text(@DocumentUniqueID)+"?OpenDocument\">" + @Trim(titleList) : Title +"</a>";

@Implode(html;" > "




Welcome!
Welcome to LotusUserGroup.org's group


This blog is hosted by LotusUserGroup.org but all LotusUserGroup.org members are welcome to join in and post in the blog. Administrators at LotusUserGroup.org will try to maintain a constant stream of insightful comments, community information, links to useful sights and posts on other blogs, and, of course, answers to your questions whenever possible. So join in, post a blog, comment on posts, ask questions, share your knowledge, and state your opinions…

All Content Copyright 2006 LotusUserGroup.org.

Contact
By Category
: #ibmexperience
: #ibmexperience, Industry, Lotusphere 2011
: #LS11
: 2 Minutes With... Podcast
: Admin 2009 Boston
: Admin Training
: Admin2006
: Admin2007
: Admin2008
: Admin2010 and Lotus Developer2010
: Admin2011 and Lotus Developer2011
: AdminEurope
: Admon2009 Boston
: Annotated Links
: Blackberry
: Blogging
: Business Partners
: Client Management
: Connections
: DB2 and Domino
: Developer Training
: Developing
: Domino Monitoring
: Embedded Views
: Events & Training
: IBM Lotus Case Studies
: IBM Workplace
: Industry
: iPhone
: IWOEKS08
: Java
: LEI
: Lotus Blogs
: Lotus Certification
: Lotus Developer 2010
: Lotus Jobs
: Lotus Knows
: Lotus Nomad
: Lotus Notes
: Lotus on Linux
: Lotus R7
: Lotus Traveler
: Lotus Web Development
: Lotusphere 2012
: Lotusphere Comes To You ONLINE
: Lotusphere, Lotusphere 2011
: Lotusphere2006
: Lotusphere2007
: Lotusphere2008
: Lotusphere2009
: Lotusphere2009, LS09
: Lotusphere2010
: LotusUserGroup.org
: LUG Lotusphere Challenge
: ND8
: Newsletter
: None
: Quick Place
: Quickr
: Sametime
: SameTime & Hannover
: Security
: Show-n-Tell Thursday
: Sys Admin Questions
: User Group Meetings
: User information
: Webcasts
: XPages
: ye11ow day
:
Powered by
Blogsphere
Lotus Domino ND7 RSS OPML List RSS News Feed RSS Comments Feed Podcast Feed Blog Admin Lotus Geek OpenNTF BlogSphere


Site hosted by


Copyright © Wellesley Information Services and LotusUserGroup. All rights reserved. Email: usergroupinfo@lotususergroup.org
LotusUserGroup, 20 Carematrix Drive, Dedham, MA 02026, USA.
Sales and Customer Service: 1.781.751.8755