140 pts.
 Adding the NoteID to a View?
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.

Software/Hardware used:
ASKED: July 2, 2008  3:26 PM
UPDATED: July 15, 2008  2:00 PM

Answer Wiki:
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>
Last Wiki Answer Submitted:  July 15, 2008  2:00 pm  by  Brooklynegg   3,845 pts.
All Answer Wiki Contributors:  Brooklynegg   3,845 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _