PermaLink Computed for Display fields and my moment of Zen.07/22/2008 09:34:55 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

Commentsv

1. 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;" > "




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. 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!




Enter Comments^



Email addresses provided are not made available on this site.





You can use UUB Code in your posts.

[b]bold[/b]  [i]italic[/i]  [u]underline[/u]  [s]strikethrough[/s]

URL's will be automatically converted to Links


:-x :cry: :laugh: :-( :cool: :huh: :-) :angry: :-D ;-) :-p :grin: :rolleyes: :-\ :emb: :lips: :-o






Remember me    

Add Manual Trackback
Please enter the details of the trackback post. Your trackback will not appear on the site until it has been verified. This won't be immediate, as trackbacks are validated on a scheduled basis. Be patient.

Site Name

Permanent URL of TrackBack Post

Title of Post ( If Any )

Excerpt of Post ( Max 250 Chars )



Welcome!
Welcome to LotusUserGroup.org's group blog hosted by Jess Stratton, blogged by LotusUserGroup.org members.

Jess Stratton is the principal consultant for Solace Consulting. She has over 7 years experience with Lotus Notes & Domino, specializing in both administration and development. Jess is a sought-after author and speaker and owns and operates a computer training facility that specializes in end-user education and guest lecturing. And now, Jess is hosting the blog on LotusUserGroup.org.

As always, all LotusUserGroup.org members are welcome to join in and post in the blog. But now, with Jess hosting, she'll be adding 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 she can. So join in, post a blog, ask questions, share your knowledge, and state your opinions…

All Content Copyright 2006 LotusUserGroup.org.

Contact
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 © 2006, 2007 Wellesley Information Services and LotusUserGroup. All rights reserved. Email: usergroupinfo@lotususergroup.org
LotusUserGroup, 990 Washington St, Suite 308, Dedham, MA 02026, USA.
Sales and Customer Service: 1.781.751.8755