Add code to Lotus Notes view column

New to programming in Notes. I have version 8.5 of Domino Designer. I created a simple 3 field form called cvt. One of the fields (author)is meant to capture the person creating the document so I used @Author and it worked but I got a lot of info after the name I did not want, so I changed the code to @LeftBack(@Author; "/") and now the form field simply just shows the persons name. Perfect.

My problem is when I created a VIEW called CVT to show these 3 form fields for each created document. For each column I tied the column to the form field so the view column Author is tied to the form field called author. When my users create new documents now and I use the CVT view, the author column has a long string of crap in it right after the name. if you open the document the form shows just the name, but in the view it shows more than just the name. How do I truncate all the crap after the name in the view? I am not sure how to add code to a view column, I usually just name the column, size its width and tie it to the form field name.
thx experts...
BobR
bobrossi56Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Steve KnightIT ConsultancyCommented:
OK, what is the "crap" bit look like, /OU/OU/Organisation or o=OrgName and the like?

If you highlight a document in the view, pres Alt-Enter and you can see hte properties box for it.  Make sure it says "document" in the drop down and then in the second tab you can see a list of the fields in the document.  Highlight the one in question, what does it say?

Without going into (too) long boring details, a field created using the field type "Authors" is used to give whichever names are in there access to the document when their access through the ACL to the database as a whole is "Author".  If the users don't need to go back and amend, or they have "Editor" access to the ACL then storing the name in a "text" field or "names" field will suffice.

A function you may not know about is:

@name([CN];Yourfieldname)
or
@name([Abbreviate];Yourfeildname)

The first just gives the person's actual name, i.e. CName
The second gives shortened form, e.g. Steve Knight/org/Dragon as opposed to CN=Steve Knight, OU=Org, O=dragon etc.

So to answer your question check the field type and data in the field for starters.  If you don't need the editing functionality mentioned above and your organisation structure isn't important to record, then just create a field, make it "text" and "computed when composed" and @name([CN];@Author);  

If you add a formula to Translation formula as @name([CN];@ThisValue); then any existing documents when opened and re-saved will change to be the same.  Your view can then just show "FieldName" as the formula.  If there are lots of documents we can write an agent to update all existing documents if needed.

If it isn't clear or not sure once you see the properties for that field in Alt-Enter box post here - you can copy and paste the right hand side of the field details from that box as text to clipboard by highlighting and Control-C etc.

Good luck with domino programming, learned @formula over 20 years ago now with R3 of notes when it was all we had to use and it is very powerful what it can do with a few commands.

Steve

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bobrossi56Author Commented:
I used your "just create a field, make it "text" and "computed when composed" and @name([CN];@Author);" suggestion and it worked perfectly. I did not know about that. I will file it away for sure.
thanks again...BobR
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.