Field 'alertExpressionSource' is required

[size=150][color=#FF0000]Field ‘alertExpressionSource’ is required.[/color][/size]

I see this but there isn’t documentation for this in the manual.

I am trying to set up a Distribution alert. Having trouble with setting up the expression in the group. Looks like there is a lot of potential here for what I want to do, but I just don’t know where to start.

It is mentioned in the links below but is never explained and no example given. I really wish we would expand on the documentation of features in the manuals before expanding on anything else. Examples please…

inductiveautomation.com/supp … erties.htm

inductiveautomation.com/supp … erties.htm

So what would I like the expression to resolve?

If I could fire this email distro for the following case:

Has a tag path Fulton/Fulton temp where severity is high

or

Has a tag path Oil/Oil Level where severity is high

or
(
Has a tag path Hydro/Pressure where severity is high
and
Has a tag path Hydro/Temp where severity is high
)
Or
… and so on… any other scripting options or flow logic examples would be nice as well.

can someone just copy and past an example for their most advanced distro group expression?

That error is admittedly not very helpful, but basically what it’s saying is that you’re leaving the expression field blank.

You can improve the process of editing distribution groups a bit by importing this useful window that allows you to edit the group in a project.

As for the syntax, it’s the same as the expression language, with the addition of certain additional items that you can reference, like the tag path. The possible fields are the same as those defined for custom alert messages
(Note: Don’t worry, we’re well aware that the user manual needs to be improved. Addressing usability issues and the user manual is our next top priority.)

Severity (referenced by {[SEVERITY]}) can be used like a number, 0 (low)-4(high). So, you could do something like what you asked with the following (note: something like “tagpath=x and tagpath=y” doesn’t make sense, since the expression is evaluated for each alert that comes through):

{[SEVERITY]}=4 && ({[ITEM_PATH]} like '%Fulton/Fulton temp' || {[ITEM_PATH]} like '%Oil/Oil Level')

Basically, since all of your conditions where based on high severity, we check that first, and then check a list of tag paths. I used “like” with a wild card on the front to make it insensitive to the tag provider name.

Hopefully others will post examples of their distro group expressions.

Regards,

({[ITEM_PATH]} like '%Fulton/Fulton temp'  &&  {[SEVERITY]}=4 ) || ({[ITEM_PATH]} like '%Oil/Oil Level' && {[SEVERITY]}>1)

Thanks Colby.

What I was trying to get at with [quote] something like “tagpath=x and tagpath=y” [/quote] was only sending an email if two specific alerts were active at a specific time. So if x was already active and y fired this event then it would send the email.

Error inserting new group.
String or binary data would be truncated.
See log for details.

What is the maximum length for this expression?

Doh. I hate when difficulty get compounded with weird problem. Anyhow, what’s going on is that the expression column is being made as a varchar (and probably limited to 255). You’ll need to update the column in the db to accept more (just like on that other thread by someone else with a similar problem, where you asked for an example… so you might already be onto this).

To give an exact answer, we’ll need to know which db system you’re using.

Regards,

Don’t know if you’ve gotten a chance to look at this, but thought I would post the fix for mysql at least. If using something else, you’ll just need to find the correct “long text” data type for that DB.

alter table alert_distro_groups modify column expression text;

Regards,