Das Notes Forum

Domino 9 und frühere Versionen => ND6: Entwicklung => Thema gestartet von: Bookio am 23.04.04 - 11:15:46

Titel: @dblookup in LS
Beitrag von: Bookio am 23.04.04 - 11:15:46
Hellau zusammen!

Muss ein Feld nach Eingabe prüfen, ob eine Bewilligung vorhanden ist. Aus diesem Grunde sollte ich wissen wie ich den (sonst verwendeten) @DBlookup-Befehl im Lotus Script anwende.

type := "" : "NoCache";
serverdatabase := @DbName;
view := "$erfBew";
key := dlgFahrzeughalter;
columnNumber := 4;
tmp:=@DbLookup( type ; serverdatabase ; view ; key ; columnNumber );
@If(@IsError(tmp);"";tmp)



MFG, Bookio
Titel: Re:@dblookup in LS
Beitrag von: eknori am 23.04.04 - 11:23:57
Function DBLookup (strClass As String, strNoCache As String, strServer As String, strDatabase As String, strView As String, strKey As String, strReturn As String) As Variant
   
   quotes = Chr(34)
   strFormula = "@DbLookup(" & quotes & strClass & quotes & ":" & quotes & strNoCache & quotes & ";" & quotes & strServer & quotes & ":" & quotes & strDatabase & quotes & ";" & quotes & strView & quotes & ";" & quotes & strKey & quotes & ";" & strReturn & ")"
   
   DbLookup = Evaluate( strFormula )
   
End Function
Titel: Re:@dblookup in LS
Beitrag von: koehlerbv am 23.04.04 - 12:41:07
... oder gleich LS pur mit
NotesView.GetDocumentByKey (wenn ein Treffer reicht)
oder
NotesView.GetAllDocumentsByKey (wenn man alle Treffer braucht, insofern man überhaupt mehr als einen erwartet).

Bernhard