Access Items with special characters using backend objects

This tip explains how to access fields that contain special characters such as $.

In typical LotusScript shorthand notation, we access items on a document by simply referencing them like this: documentObject.ItemName(0). But how do you get fields with special characters like all the $ fields, such as "$Title" or "$UpdatedBy"? Here is what I found.

I have been looking for this feature for a long, long time. Not sure if I am the last to know about this or not, but here it is.

dim originatorOfThisDocument  as string

'  Fetch a back-end document object however you normally would
set gLibCurrentNotesDocument = LibGetDocument( gLibCurrentDatabase, "vwDocID", someDocID )

'  I'm not adding the nice checking for valid objects, etc . . . .

originatorOfThisDocument = gLibCurrentNotesDocument.~$UpdatedBy(0)

Notice the Tilde before the special character. That is the trick. No longer do you have to fetch items or GetItemValues.

So cool I had to pass it on.

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip exchange by member Steven Rieger. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.

This was first published in May 2005

Dig deeper on LotusScript

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close