Variables Challenge - Create and eMail a List

Jan 09, 2013

Here is my next variables challenge / question(s)....

Assume I have a list of 10 things (my list is much bigger, but I'm keeping it simple for this example).

I would like for users to able to click on mutiple items from the list (in any order) and have those items added to a master list; kind of like adding items to a shopping cart. If they click an item twice, it should only appear in the list once... so no duplication. Users should be able to click any number of items (as few as 0 and as many as 10).

Next, I would like for users to see their selections as a new list (you selected the following....) and in the order that they selected them.

Lastly, I would love for them to click a button that would generate an email (using MS Outlook) with a pre-determined recipient/mailbox, subject line, and content (where their list is the content).

4 Replies
OWEN HOLT

I found a response from the great Jeanette Brooks in another thread that gets me part way there on option 2. But I would still really love some thoughts on my first proposal.

Jeanette Brooks said:

Hi Ari, one way to do it would be to use the "Jump to URL/File" trigger on your button, and for the URL, use the code generated from this little tool: http://email.about.com/library/misc/blmailto_encoder.htm

When you apply the Jump To URL/File trigger, you'll also be able to click the little globe icon to set the browser window properties, and you'll probably want to use "Display in current browser window."


Now if only I can find a way to get the content of a variable to be the body text of the email....
OWEN HOLT

OK - I can get the variables into the text body... thanks to David Burton:

David Burton said:

Appending/inserting the ASCII code equivalent (%0D%0A) for a carriage return and linefeed should do the trick. To add a blank line in between new lines, simply add another instance of (%0D%0A).

var email="your_email@domain.com";

var subject="subject line";

var player = GetPlayer();

var body_start=new Array();

body_start[0]=player.GetVar("TextEntry4");

body_start[1]=player.GetVar("TextEntry2");

body_text = body_start[0] + "%0D%0A%0D%0A" + body_start[1];

var mailto_link='mailto:'+email+'?subject='+subject+'&body='+body_text;

win=window.open(mailto_link,'emailWin');

I hope this helps!

Now if I can get help with putting the first "object selected" into variable 1 and the second "object selected" into variable 2, etc... I should be well on my way.

Shwetha Bhaskar

Hi Owen,

I did a small mockup of the first part of your issue (attached). You can assign the variables marked list1, list 2 etc. in the body text to make up the list in place of the TextEntry variables.

The thing i wasn't able to figure out was the formatting - how to close the gaps between the items in the list so as to have it evenly ordered (same issue will crop up in the email I suppose). With even items, there are just too many combinations to set up triggers so as to shift the position of the list items accordingly. I don't know what your context is but while displaying the list in the Storyline module, maybe you can have the items arranged in a sort of haphazard 'Wordle' like format so the gaps aren't obvious? Or maybe display all the items in the list, with the items that are not selected greyed out?

As for the e-mail, maybe play around with the way the string is concatenated along with the punctuation so as to not make it really obvious?

Will chew on it some more and post again if I come up with a better solution...

-Shwetha

This discussion is closed. You can start a new discussion or contact Articulate Support.