Jump to content

Automatic Email Templates?


---
 Share

Recommended Posts

Does anyone have any custom Automatic Email Templates beyond the 3 provided?

What I would like to do is have a filter on the template -- right now it shows characteristics passed/failed but not all of these characteristics are critical. We have a measurement attribute job to assess whether the criticals have passed or failed and assigns an Approved or Blocked based on that condition. So I would really like to eliminate what appears to be a false failure when the non critical dimensions are out.

The email template is in HTML and that's just not really my wheelhouse.

Laura
Link to comment
Share on other sites

I used to chug a lot of html/xml when I was young(er). Do you have a template that you can share and point out what you wish to change. I might be able to help if I get some time over. We are soon ready to make the step over to piweb our self. So I better fresh things up anyway. And html5 actually makes my fingers itch again 🙂
Link to comment
Share on other sites

It's a combination of HTML and java script I think, I know they use java script for some other functions in PiWeb (in the write measurement attribute jobs).

I've attached a .zip of all the components in the measurement template. What I'm looking for is, only show measurements that meet 'Blocked' Approval status.

Or, maybe I'm dreaming, only show measurement records where Characteristic Attribute 'Critical Characteristic' = Yes and 'Approval Status' = Blocked

Normally a super easy thing to do in the report structure..

measurementStatus - Copy.zip

Link to comment
Share on other sites

Please sign in to view this quote.

It's a function of PiWeb enterprise, sending automatic e-mails on measurement status or server health. It's pretty cool but as usual I am looking to customize everything to my needs. 😜
Link to comment
Share on other sites

Well its actually c# and html.
Since I can't test the outcome my self, I cant write if for you. It how ever seems simple enough to explain.
Bare in mind that I looked at it breifly while eating my go to bed sandwitch.. 🙂

In "body.cshtml"
One line 35 you start to assign variables, that you use to create a tuple and store in "data".
Here I assume you also need create a tuple filled with your "Critical Characteristic".

Something in line with:
var CTQ = (double)Model.GetAttributesWithinCriticalToQuality();
But I have no clue what the internal name of your "Critical Characteristic" is. Or how that info is stored.

Unless I get more info I cant do much more.
So, line 35-45 is where you should put you focus. The rest is just boring cosmetic stuff.
Link to comment
Share on other sites

 Share

×
×
  • Create New...