Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
I have one requirement, I want to send the grid data to the user through e-mail. what is the feasible solution.
Just build and email with HTML Content and send it with the MailExtension
Thanks,
could you please elaborate little bit and if any sample code you have .
You just need to fill a String with the desired html format and send it with a Thing which derived MailServer ThingTemplate (that you will find on Marketplace Extension: https://marketplace.ptc.com/apps/193028/mail-extension )
var emailContent = "<html><body>\ <table>\ <tr><td>Column1</td><td>Column2</td></tr>\ <tr><td>RowValue1</td><td>RowValue2</td></tr>\ </table></body></html>" Things["YourMailServerThing"].SendMessage({ from: "youremail@yourmailserver", to: "email_destination@anothermailserver", subject: "Awesome email, with a table :P", content: emailContent });
Thanks carles, but for filling that content definitely we need to get that grid data into the service first, then only it will possible right?
Yes of course, you have to build a service which accepts the Infotable ( if you fill de Grid, you already have a service that fills the grid, just get this output and use it as input of the SendGridToEmail service ) and sends it through email.
Thx Carles,
I have binded the selected rows property of a grid to my service input which is of type infotable. now i want to check whether that input has that selected rows data or not, that how should I check. is it possible by setting logger.info or something else.
You have to bind from the right side ( service Selected Rows, the one that fills the grid) not from the Grid.
I have done but how can I check whether I got that infotable in my input or not?
logger.info("Number of rows "+yourInputInfotableName.rows.length);
No Luck, something may be went wrong at bindings :(
Hi Carlos,
assume there is one service and its output type is infotable and I want to take this output as input for another service then I need to mention the name infotable, at that cas what would be the name of infotable , is it a datashape name or service name? where would i fond infotable name
I'm sorry I don't get the point, you just need to bind the output from the service to the input of the other server within the mashup, no need to set any name.
I have binded as you said only but that service is having inputs also how should I bind that inputs also? could you please help me out?