I have a leave form that has been working fine in the past for users, but just received a call from one that when they click on the Send to Employee button, that has worked fine in the past, they are not getting their form sent to them. The code for the button is: FIELD SendTo:=SendTo;FIELD SignBoxSuprv:=SignBoxSuprv;
@MailSend(SendTo;“”;“”;“I have approved your leave form dated: " + @Text(LvDateSign);“Please click on this link to open the form”+@NewLine;”";[IncludeDoclink]);
@Prompt([Ok]; “OPM Form 71”; "The leave form was sent back to " + @Name([CN];Author) + " at " + @Text(@Now; “T0S1”) + “.”)
This has not changed at all - but just recently - and sporatically - is not working.
I think possibly what is happening here (I’m not entirely sure, maybe someone can confirm?) is that you are assigning the value of SendTo to a temporary variable called SendTo. Then, although you are setting the FIELD SendTo with the value of the Author field, your SendTo VARIABLE is not getting updated. Do you actually need to do your 3 FIELD fieldName := fieldName assignments at the top of the formula? Try taking them out and see what happens. It seems like you’ve got a few more lines of code than you need - you could probably replace the first 6 lines of code with these 3:
Emily - thanks for the response. In essence you are saying that I can take out the top 3 lines (FIELD…) and the @SetField should work? Let me try it and I’ll get back to you.
Is the Author field one that has to be filled in, or selected, or computed?
Reason I ask, is that I had users who would assume "type-ahead" worked even when you misspelled the name, or not check the name they typed in before they mashed the send button. The mail never got sent because the name was incorrect or misspelled.
Is it possible that the sent mail is sitting in the local user’s mail.box?
Is it possible the user’s are getting an error message before the @Prompt, but because they see the @Prompt dialog, they assume the mail was sent? (i.e. if I enter a incorrect date: 2/31/2005, I get an error message, but I also get the @Prompt)
Sometimes users don't remember seeing the error message, or blow by it thinking it's unimportant.
Narashimhan - thanks for the post but it does not seem to work. The SendTo field is being populated with the Author’s name (“CN=Skip Brandon/OU=AWA/O=FAA”), the doc doesn’t seem to get into the Outbox.
Narasimhan’s method would suggest forcing the name into the sendto slot to determine whether it is the sendto value that the formula is failing on. If you tried this and it doesn’t work suggests there are other factors.
one thing to check (extra work but might help to confirm) would be to hard code a name. If the mail is still not sent, then something else is breaking it.
Jon - thanks. Will hardcode. The dang thing is that it has been working fine for the caller/user but now it doesn’t. I am using the exact same code in another form and though the setfields populate the sendto fields as required, the form never gets sent. There are no dlog boxes indicating what is wrong either. Thanks for the help.