sorry, ich stelle auch hier den zugehörigen Code hinzu.... und wäre echt dankbar für Tips.....
REM {Versand einer Info-SMS an Vorgesetzte, wenn Mitarbeiter Geburtstag haben!!!} ;
REM {Wenn Logging = "Ja" - Ausgabe von Debug-Prompts!} ;
Logging := "" ;
db := @DbTitle ;
server := @Subset( @DbName ; 1 ) ;
pfad := @Subset( @DbName ; -1 ) ;
anrede := Salutation ;
vorname := FirstName ;
nachname := LastName ;
geburtstag := @Text( Birthday ; "D0" ) ;
region := SalesBranch_3 ;
abteilung := @Word(Position; " "; 2) ;
position := @Word(Position; " "; 1) ;
key := region + "," + "Leiter" + "," + abteilung ;
SendenAnA := @DbLookup( "" : "NoCache" ; server : pfad ; "PersonHeads" ; key ; 2 ; [FailSilent] ) ;
REM {SendenAnA := "0172xxxxxxx@SMS"} ;
keyHead := region + "," + "Leiter" + "," + "Region(en)" ;
SendenAnB := @DbLookup( "" : "NoCache" ; server : pfad ; "PersonHeads" ; keyHead ; 2 ; [FailSilent] ) ;
REM {SendenAnB := "0163xxxxxxx@SMS" };
Empfänger := SendenAnA : SendenAnB ;
thema := "Info. aus " + db + ": >>" + anrede + " " + vorname + " " + nachname + " hat heute Geburtstag ! <<" ;
inhalt := " Geburtsdatum ist der: " + geburtstag + " !" ;
@If(Logging = "Ja" ;
@Prompt([Ok]; "anrede vorname nachname" ; anrede + " " + vorname + " " + nachname ) &
@Prompt([Ok]; "geburtstag" ; geburtstag ) &
@Prompt([Ok]; "region,position,abteilung" ; region + "," + position + "," + abteilung ) &
@Prompt([Ok]; "key" ; key ) &
@Prompt([Ok]; "SendenAnA" ; @Implode( SendenAnA; " : " )) &
@Prompt([Ok]; "keyHead" ; keyHead ) &
@Prompt([Ok]; "SendenAnB" ; @Implode( SendenAnB ; " : " )) &
@Prompt([Ok]; "Empfänger" ; @Implode( Empfänger; " : " ) ) &
@Prompt([Ok]; "thema" ; thema ) &
@Prompt([Ok]; "inhalt" ; inhalt ) ;
""
) ;
REM {Versand nur, wenn Monat und Tag des Geburstages gleich Monat und Tag von Heute sind !! } ;
REM {@MailSend( SendenAn ; KopieAn ; BlindkopieAn ; Thema ; Anmerkung ; Haupttextfelder ; [Flags]) } ;
REM {Empfänger := "0172xxxxxxx@SMS" : "0163xxxxxxx@SMS" };
@If( Form = "Person" & Birthday != "" ;
@If( ( ( @Day( Birthday ) = @Day( @Now )) & (@Month( Birthday ) = @Month( @Now )) ) ;
@MailSend( Empfänger ; "" ; "" ; thema ; inhalt ; "" ; [IncludeDoclink] ) &
@If(Logging = "Ja" ; @Prompt([Ok] ; "Hinweis" ; "SMS an: " + @Implode( Empfänger ; " : ") + " versandt !") ; "" ) ;
"" ) ;
"" ) ;
SELECT @All