Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Assigning Name to XML file

Avatar

Avatar
Level 2
DonKeating
Level 2

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
DonKeating
Level 2

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
View profile
DonKeating
Level 2

06-03-2005

Hi Y'all,



I'd like the XML file name being submitted with "Submit via Email" button be value entered in one of the required text fields.



In current case name of the field is ClubNumber. For xample if user entered 22155 in the field, the XML file would be named 22155.xml.



How can I do that?



Thanks,




Replies

Avatar

06-03-2005

Donald,



As far as I know, you can not change the name of the attachment file via the email submit button.

Avatar

Avatar
Level 2
DonKeating
Level 2

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
DonKeating
Level 2

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
View profile
DonKeating
Level 2

07-03-2005

Was afraid of that but, thanks for the quick reply.




Avatar

Avatar
Level 2
DonKeating
Level 2

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
DonKeating
Level 2

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
View profile
DonKeating
Level 2

07-03-2005

Just revisited my form and have this additional question.



How can I add the value of a text field to the Email subject field?



Examples:

Current value in email subject field is "SCODAchievementsData"



I'd like to add value of ClubNumber field so it would look like this "SCODAchievementsData - 22155" assuming the value of ClubNumber field is "22155".



Thanks,




Avatar

07-03-2005

You can set the subject line using the ?subject= parameter in the mailto target. For example:



if (SCODAchievementsData.rawValue != null)

{

var oSubmitTarget = this.resolveNode("#event.#submit").target;

var nLoc = oSubmitTarget.indexOf("?subject=");

if (nLoc > -1)

{

var target = oSubmitTarget.substring(0, nLoc);

this.resolveNode("#event.#submit").target = target + "?subject=" + SCODAchievementsData.rawValue;

}

}

Avatar

07-03-2005

Forgot to mention, that you should use the preSubmit event of the email submit button for this code sample

Avatar

Avatar
Level 2
DonKeating
Level 2

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
DonKeating
Level 2

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
View profile
DonKeating
Level 2

07-03-2005

David,



I don't find a "presubmit" event for the "Submit by Email" button.



Am I missing something?



Thanks,




Avatar

07-03-2005

3/4 the way down in the list of available events you have postPrint, preSubmit, docReady and docClose.

Avatar

Avatar
Level 2
DonKeating
Level 2

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
DonKeating
Level 2

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
View profile
DonKeating
Level 2

08-03-2005

Found it!



Now must learn something about JavaScript.



Thanks for your help,




Avatar

03-09-2007

David,



I am new to Live Cycle, and only have little knowledge about JavaScript. And based on the code sample above, I am a little clueless as how to associate a particular field to the subject, which variable will stores the information in the field? I am having the same situation as Donald.



Thanks.

Jon