Autor Thema: How can make an update on a doc link ?  (Gelesen 5427 mal)

Offline Toma Bogdan

  • Aktives Mitglied
  • ***
  • Beiträge: 146
  • Geschlecht: Männlich
  • That's me ...
    • A nice site !
How can make an update on a doc link ?
« am: 19.10.02 - 14:24:26 »
The situation:
- database A with doc X
- database B with doc Y
- database C with 0 doc

I create a doclink to Y (placed into db B) from into doc X (placed into db A) with AppendDocLink from an scheduled agent ! Then I move the doc Y from database B to database C !

How can I make it so the link from doc X (placed into db A) to route to doc Y (placed into db C) ?

PS If there are many docs from db A that have a link to the same doc Y (even this have been moved to the db C), how can I proceed to have a good link ?

thanks !

Offline Rob Green

  • Freund des Hauses!
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 2.651
  • Geschlecht: Männlich
    • Meipor
Re:How can make an update on a doc link ?
« Antwort #1 am: 21.10.02 - 11:32:22 »
in the moment you move the doc to a new db you have to place actively a new doclink and delete the first doclink. There is no updating method. BUT if you have more then one doclink in docX you have serious probs to identify the right link. You may find a reserved field "$links" but you cant work with them in LS. There is no known method to handle doclinks with LS at all, there are just some turn arounds with Notes API (look at the gold forum at http://www-10.lotus.com/ldd).
Vielleicht verdirbt Geld wirklich den Charakter.
Auf keinen Fall aber macht Mangel an Geld ihn besser.
(John Steinbeck)

Meiporblog: http://www.meipor.de/blog
allg. Unternehmerblog: http://www.m-e-x.de/blog

Offline Toma Bogdan

  • Aktives Mitglied
  • ***
  • Beiträge: 146
  • Geschlecht: Männlich
  • That's me ...
    • A nice site !
an ideea ...
« Antwort #2 am: 21.10.02 - 13:27:28 »
It seems that another ideea is when I move the doc Y from db B to db C to check all the docs from db A to see if these are related to doc Y (use NoteID - it is unique in a db) and if the link (NoteID+CrtDbName) isn't valid to rebuild the DocLink with NoteID+NewdbName !

it is a good idea ?

Offline Rob Green

  • Freund des Hauses!
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 2.651
  • Geschlecht: Männlich
    • Meipor
Re:How can make an update on a doc link ?
« Antwort #3 am: 21.10.02 - 14:12:52 »
to trigger such an event "on the fly" you should choose the view event "Query Paste" and the database event "QueryDocumentDelete" (depending on the given process en detail).

But once again: in your first posting you refered to the notes in-built "doclink" object, now you´re speaking about another kind of relation. However, true doclinks arent accessable by Script or any other built-in Notes method, just Notes API (which i dont know about). Whatever kind you choose, you can trigger it as aforementioned.

Couldnt you generate something in a way of a mapping table? A central document, inheriting all doc-relationships. Any movement is logged through and about that document. No doc-links, just
1. "Doc A.."UNID" > inherited in "Doc B" .."UNID"
2. "Doc C.."UNID" > inherited in "Doc E" .."UNID"
...
based on this you could design your further needs
« Letzte Änderung: 21.10.02 - 14:18:05 von Rob Green »
Vielleicht verdirbt Geld wirklich den Charakter.
Auf keinen Fall aber macht Mangel an Geld ihn besser.
(John Steinbeck)

Meiporblog: http://www.meipor.de/blog
allg. Unternehmerblog: http://www.m-e-x.de/blog

Offline Toma Bogdan

  • Aktives Mitglied
  • ***
  • Beiträge: 146
  • Geschlecht: Männlich
  • That's me ...
    • A nice site !
Re:How can make an update on a doc link ?
« Antwort #4 am: 21.10.02 - 15:14:39 »
yes, I can use the Postdocumentdelete or Querydocumentdelete event to control the update of the docLink (with the AppendDocLink method).
When I move the doc Y  from db B to db C, I will delete the doclink of the doc X and then I will updated it (create again) with a new doclink to the doc Y from the db C !

With this method I don't need to use another form into db A or a doc to keep all doc-relationships ! Isn't it ?

 :o

Offline Rob Green

  • Freund des Hauses!
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 2.651
  • Geschlecht: Männlich
    • Meipor
Re:How can make an update on a doc link ?
« Antwort #5 am: 21.10.02 - 15:27:06 »
yes, ;D with deleting the old and creating the new doclink i wouldnt say no more that you´re getting in trouble with that kind of "updating"  ;D ;D

Really, R6 is nice, but this kind of HTML Link Checking ... it is that ... waiting for Rel 42  8)
Vielleicht verdirbt Geld wirklich den Charakter.
Auf keinen Fall aber macht Mangel an Geld ihn besser.
(John Steinbeck)

Meiporblog: http://www.meipor.de/blog
allg. Unternehmerblog: http://www.m-e-x.de/blog

Offline Toma Bogdan

  • Aktives Mitglied
  • ***
  • Beiträge: 146
  • Geschlecht: Männlich
  • That's me ...
    • A nice site !
x !
« Antwort #6 am: 22.10.02 - 09:48:06 »
x ! I will try and maybe ....we will talk after this  :-X

Offline Rob Green

  • Freund des Hauses!
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 2.651
  • Geschlecht: Männlich
    • Meipor
Re:How can make an update on a doc link ?
« Antwort #7 am: 22.10.02 - 10:03:24 »
that Notes API part = there is another thread at spotlight.de with a very similar question. A guy named "Odi2000" claims to have a .dll which reads the doclinks in a document and is able to find with getdocumentbykey the referenced docs. He´s willing to share his .dll if he´s mailed.

look here:
http://spotlight.de/zforen/lts/m/lts-1035206853-11693.html

if you try it out, please inform me about  :)
Vielleicht verdirbt Geld wirklich den Charakter.
Auf keinen Fall aber macht Mangel an Geld ihn besser.
(John Steinbeck)

Meiporblog: http://www.meipor.de/blog
allg. Unternehmerblog: http://www.m-e-x.de/blog

Offline ata

  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 5.092
  • Geschlecht: Männlich
  • drenaiondrufflos
    • Anton Tauscher Privat
Re:How can make an update on a doc link ?
« Antwort #8 am: 24.10.02 - 12:24:38 »
... if there is no need for to work with the standard Notes-doclinks, there is a possibilty to work with .ndl-Files (Notes-Doc-Link)...

ata
Grüßle Toni :)

Offline Toma Bogdan

  • Aktives Mitglied
  • ***
  • Beiträge: 146
  • Geschlecht: Männlich
  • That's me ...
    • A nice site !
Re:How can make an update on a doc link ?
« Antwort #9 am: 24.10.02 - 12:30:43 »
- rob, I wrote to Odi2000 from http://spotlight.de/zforen/lts/m/lts-1035206853-11693.html but nothing until now....

- ata, how can I work with "ndl-Files" ?

Offline Rob Green

  • Freund des Hauses!
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 2.651
  • Geschlecht: Männlich
    • Meipor
Re:How can make an update on a doc link ?
« Antwort #10 am: 24.10.02 - 12:34:52 »
i dont know personally this guy, so i cant tell if he´s just a faker or not.    :-\
Vielleicht verdirbt Geld wirklich den Charakter.
Auf keinen Fall aber macht Mangel an Geld ihn besser.
(John Steinbeck)

Meiporblog: http://www.meipor.de/blog
allg. Unternehmerblog: http://www.m-e-x.de/blog

Offline ata

  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 5.092
  • Geschlecht: Männlich
  • drenaiondrufflos
    • Anton Tauscher Privat
Re:How can make an update on a doc link ?
« Antwort #11 am: 24.10.02 - 12:37:19 »
... to do it by hand:

1. Copy the document as DocLink
2. Open your editor and paste your clipboard
3. Save the file with the extension ".ndl"
4. Attach the file in your document

... to do it with an agent:

Create a button in the document that does:
@Command([EditMakeDocLink]) ;
@Command([ToolsRunMacro]; "SendNDL")

Here is the "SendNDL" Agent:

'[Options]
Option Public
Public Const CF_TEXT = &H001

'[Delcarations]
Declare Function OpenClipboard Lib "User32.dll" Alias "OpenClipboard" (Byval hWnd As Long) As Long
Declare Function GetClipboardData Lib "User32.dll" Alias "GetClipboardData" (Byval wFormat As Integer) As String
Declare Function CloseClipboard Lib "User32.dll" Alias "CloseClipboard" ( ) As Long

'[Initialize]
Sub Initialize
Dim Status As Long
Dim ptr As Long, ghand As Long,handle As Long
Dim Text As String
Dim SendTo As String

Dim s As New notessession
Dim db As NotesDatabase
Dim doc As notesDocument
Dim rtitem As NotesRichTextItem

Set db = s.currentdatabase
Set doc = db.CreateDocument()

' Control of platform 16/32-Bit
If Instr(s.platform,"16") Then
Messagebox ("Wrong Windows-platform; this agent runs only under Windows NT/95")
Exit Sub
End If

' open clipboard
Status = OpenClipboard(handle)
If Status <> 0 Then
' reading clipboard contents
Text = GetClipboardData(CF_TEXT)
Status = CloseClipboard()
Else
Messagebox ("Error opening the clipboard!")
Exit Sub
End If

'Create .ndl file
File = s.GETENVIRONMENTString("Directory",True) &"\link.ndl"
iFileNumber = Freefile
Open File For Output As iFileNumber
Print #iFileNumber, Text
Close #iFileNumber

'Send message
doc.Form = "Memo"
doc.SendTo = "address@email.com"
doc.Subject = "Test NDL"
Set rtitem = doc.CreateRichTextItem("Body")
Call rtitem.EmbedObject ( EMBED_ATTACHMENT, "", File)
doc.send True
Kill File

End Sub

... Thats it => i found it in eknori'es Schatzkiste...

ata
Grüßle Toni :)

Offline Toma Bogdan

  • Aktives Mitglied
  • ***
  • Beiträge: 146
  • Geschlecht: Männlich
  • That's me ...
    • A nice site !
hmm...
« Antwort #12 am: 24.10.02 - 17:53:26 »
interesting....

Offline ata

  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 5.092
  • Geschlecht: Männlich
  • drenaiondrufflos
    • Anton Tauscher Privat
Re:How can make an update on a doc link ?
« Antwort #13 am: 24.10.02 - 20:28:53 »
... if you search in the notes.net forum by ".ndl" you will find a statemanet, where the syntax of all the parameters is declared...

Is it a way for you?

ata
Grüßle Toni :)

Offline ata

  • Moderator
  • Gold Platin u.s.w. member:)
  • *****
  • Beiträge: 5.092
  • Geschlecht: Männlich
  • drenaiondrufflos
    • Anton Tauscher Privat
Re:How can make an update on a doc link ?
« Antwort #14 am: 24.10.02 - 20:35:39 »
... i forgot...

... if you know the syntax of this text-file, you can create one - this works on other platforms than "Windoof" too...

ata
Grüßle Toni :)

Offline Toma Bogdan

  • Aktives Mitglied
  • ***
  • Beiträge: 146
  • Geschlecht: Männlich
  • That's me ...
    • A nice site !
x !
« Antwort #15 am: 25.10.02 - 07:06:05 »
x ! I will read more about it....  ::)

 

Impressum Atnotes.de  -  Powered by Syslords Solutions  -  Datenschutz