This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

How do you format custom script message returns to multiple lines?

I've been able to get nicely formatted lines with custom SQL monitors, but not with the custom script monitor. Is there a way to format a message so that you can have multiple lines rather than cramming your message into a single row?

For example, I'm hitting an API and counting the number of alarms as the statistic, but in the message, I want to cleanly list out the alarms in distinct rows. Right now, I have them joined in a way that makes it semi-eyeball friendly, but it would read a lot better if the message listed each alarm neatly in a row contained in the message. 

What it looks like now:

2020-07-14_15-35-19.bmp

What I want it to look like...

2020-07-14_15-35-28.bmp

  • Just to follow up on this, using a little html markup when joining results was the trick.

    $messageAlarmDetails = $alarmDetails -join " ]`<br`>`t[ "
    $messageAlarmDetails = "Alarm Details: `<br`>`t[ $($messageAlarmDetails) ]"

    One side affect is that the markup shows up in component statistic views, however in reports (when allow HTML is selected), it works great.