Adding the NoteID to a View?

140 pts.
Tags:
Lotus
Lotus Domino
Lotus Notes
Lotus Notes View
NoteID
How do I get this to work? I have tried @NoteID but it is padded with NT000... I just want the NoteID... Basically I have extracted all the attached files to a folder of its NoteID and I need the view to show it so I can fix the link to the document. I have exported the data to Excel and then going to use excel to create a link to the files.

Answer Wiki

Thanks. We'll let you know when a new response is added.

You should use @UniqueID, not NoteID. NoteID is database specific. @UniqueID is good across multiple replicas of a database.

But, to answer the question, Take the characters off that you don’t want, if there is a set pattern to the padding. I have never used NoteID for anything, but something like this may work.

@rightback(@noteid, 5)

This assumes that the padding is always the same number of characters. If not, you will have to be more clever in your formula, checking for NT and finding the number of 0s, then trimming away what you don’t want. You may have to use a formula loop to trim the padding from the beginning of the string until you get a character that is not an N, a T or a 0, then leave the remainder.

Not too hard to do, and can be fun.

Final Results by Maramor
<pre>
Dim pathName As String
Dim dirName As String
Dim dirPad As String
Dim dirPadLength As Integer

pathName = “C:\samples”

dirName = doc.NoteID
dirPadLength = 8 – Len(dirName)
dirPad = “NT”
For i = 1 To dirPadLength
dirPad = dirPad & “0”
Next
dirName = dirPad & dirName
Mkdir pathName & “” & dirName
</pre>

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

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

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following