cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
DerekMoore
Level II

Using JMP data tables and other JMP output in email body

Hello, I am trying to create an email where the body of that email contains some data tables and images of graphs. However, at this time I cannot figure out how to use anything in the body of the email that is not text. This does not work for me because some of the data tables have multiple columns and rows and when they are added to the body as text the formatting is lost.

 

Is it possible to do what I am describing?

 

I attempted to look into using XML but I am not sure that I would be able to get what I would want. Using XML did not work because the eventual XML would need to be turned into text to go into the email body. As mentioned earlier, that ruins the formatting of the tables so I don't think I can use that. I could have been using XML wrong though.

 

I also tried to look into the Run Program() function but did not understand exactly how to use it. Would this function be able to grab a table created in another program and use that?

 

Please let me know if I can provide any further info on this. Thanks!

3 REPLIES 3
jthi
Super User

Re: Using JMP data tables and other JMP output in email body

I have used Powershell Send-MailMessage with Run Program() to embed tables and images to email body Send-MailMessage (learn.microsoft.com) . I'm fairly sure you could also do it by creating VBScript usin jsl and then opening that, but I haven't tried embedding images or tables with that method.

-Jarmo
DerekMoore
Level II

Re: Using JMP data tables and other JMP output in email body

This is great, thank you! I believe using the -BodyAsHtml section I should be able to create a customized email.

 

Would you possibly be able to share an example of how you integrated using Run Program() to run Powershell, with it including a data table or images? I think I understand how to use Run Program() to launch Powershell, but I don't think I understand how I would be able to use JMP data tables or images in the Powershell application.

 

As mentioned, I plan to use the -BodyAsHtml section in Powershell to create my email. Does that require any additional configuration to use variables, tables or images from JMP?

 

Please let me know if I can provide more info, thanks!

jthi
Super User

Re: Using JMP data tables and other JMP output in email body

I cannot share the example I have written as I did it at work. << Get HTML can be helpful and you will see that some images won't be in your report unless you do some additional things (you will see Picture Ignored in log)

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

nw = New Window("",
	dt << get as report,
	dt << Distribution(Continuous Distribution(Column(:height)), Histograms Only)
);

html_str = nw << Get HTML;

If I remember correctly I did use "cid" in the body to add the images (you can find stackoverflow posts regarding that).

-Jarmo