Hi,
I need some assistance in the best way to get field information passed from one form to another. Essentially, I’m generating a mail message from an a. I prompt before I do that to get some information that I want passed in the mail message. In that message I include a link to a website where a user fills out a survey. From the URL, I need to pass field information to the survey. Here is the agent which is passing the information. The agent is being called from an action button.
Trouble is, I keep getting TMP for the field, instead of the actual information I’ve prompted for. What am I doing wrong, and/or is their a better way to do this?
tmp := @Prompt([OkCancelEdit];“Title”;“Please enter the name of the event that this survey is for: “;””);
FIELD Subject := Subject;
FIELD Form := Form;
@SetField(“Subject”;tmp);
@SetField(“Form”;“Survey”);
@Command([FileSave]);
@MailSend(Name;“”;“”;tmp;“”;“Comments” + @NewLine + @NewLine + “Comments” + @NewLine + @NewLine + “Comments” + @NewLine + @NewLine + "Please take a moment to complete the following survey regarding your experience: " + “http://server.domain.com/xxx.nsf/(Survey)?OpenForm&Subject=tmp”)
Subject: Passing field information from mail message
Oops! You’re trying to pass information over the web from one form to the next.
Do you know how to pass the values in the URL?
Subject: One more thing…
@Prompt —> You cannot use this function in Web applications.
Subject: RE: One more thing…
Yes, I’m triggering the agent from an action button through the Notes client, and sending the URL through the mail message. Through the mail message, I want to be able to pass field information that the user is filling out on the survey from the URL link. That’s the only way I can think to do it, and in theory, you should be able to do it, but its not working for me.
Subject: RE: One more thing…
Okay…now I understand. You’re sending a URL using a Notes Client.
Did you try to simple @SetField? Get it to working and then apply the SendTo value. Perhaps it will help you figure out why it’s not working???
Subject: RE: One more thing…
I tested your code and it works fine.
The @Prompt information becomes the subject in the memo that is sent.
Here’s what it looks like:
Comments
Comments
Comments
Please take a moment to complete the following survey regarding your experience: http://server.domain.com/xxx.nsf/(Survey)?OpenForm&Subject=tmp
Not sure what you’re wanting in the three Comments areas?
Subject: RE: One more thing…
The @MailSend will not pick up any fields from the survey form on the web. Since the button was pressed from within a mail message in the Notes client the focus of the button is on the mail message document in the Notes client and will only pick up field values from there. Instead you ask the user for input on the web form and initiate the @MailSend from there upon submit.
Subject: RE: One more thing…
Thanks for the clarification Paul. I was hoping I would be able to pass that information from mail document to web form, but if I can’t, I guess I’ll just ask the user for the information.
Subject: Passing field information from mail message
Simple test works.
Changed your subject field to period; value get set as it should. Something else is going on???
tmp := @Prompt([OkCancelEdit];“Title”;“Please enter the name of the event that this survey is for: “;””);
FIELD period := period;
@SetField(“period”;tmp);
@Command([FileSave])
Reduce your code to just set the subject and test. Maybe you’ll see the error.