Domino 9 und frühere Versionen > Entwicklung
Feld SendTo auslesen
m3:
Also nach 173 Beiträgen solltest Du die Designer-Hilfe schon kennen.
--- Zitat ---You can get the value of an item through several techniques. The first two techniques do not require that you first access the item object.
* After accessing the NotesDocument object containing the item, you can specify the item name as though it were a property of the document. For example, if doc is the name of a document object and Subject is an item in the document, doc.Subject is the value of the item.
* You can use the GetItemValue method of NotesDocument.
* You can access the item and examine its Values property.
--- Ende Zitat ---
Getting an item and its values in LotusScript classes
--- Zitat ---For text, number, and time-date items, GetItemValue always returns an array, even when there is only a single value in the item. If you know the item contains only a single value, access the first element in the array, which is at index 0.
...
You can also access the contents of an item directly, without using GetItemValue. The following two statements are equivalent:
t = lastDoc.GetItemValue( "Topic" )(0)
t = lastDoc.Topic(0)
--- Ende Zitat ---
GetItemValue method
Glombi:
kleiner Tipp
dim dirName as string
dirName = strleft(strright(doc.SendTo(0),"@"),".")
Schön wird es dann mit Abfrage, ob "@" und "." im SendTo vorkommt. Das geht mit
if (Instr(doc.SendTo(0),"@") > 0) and (Instr(doc.SendTo(0),".") > 0) then
...
end if
Mehrfachwerte spielen wohl keine Rolle, oder? Denn welches Verzeichnis sollte dann genommen werden?
Andreas
DerAndre:
Hm,
wozu ist das gut:
doc.Form="Inbox$"
Das wohin sollte nicht das Problem sein, wenn ich es richtig interpretiere.
test@xy.de -> xy
test@abs.de -> abc
test@kgb.de -> kgb ;D
usw. usf.
Eher das Problem, gibt es dieses Verzeichnis schon, oder ist das dann an der Stelle nicht relevant?
MadMetzger:
Das mit dem Form-Item frage ich mich auch schon...
Das Prinzip ist ja nicht unbedingt unklar, nur sind halt auch andere Fragen offen, wie Mehrfachwerte, sofern man diese nicht zu 100% ausschließen kann.
nyen:
Mehrfachwerte spielen hier keine Rolle. Im Prinzip ist die Lösung, die wie DerAndre interpretiert hat.
Genau so:
test@xy.de -> xy
test@abs.de -> abc
test@kgb.de -> kgb
doc.Form="Inbox$", da die DB eine MailIn-DB ist (Mailschablone).
Navigation
[0] Themen-Index
[#] Nächste Seite
[*] Vorherige Sete
Zur normalen Ansicht wechseln