E130 / S130 Tags
I recently discovered the E130 / S130 tag and how useful it can be. Unfortunately, I also discovered how difficult it is to figure out. There is no documentation on the E130 tag, and most discussions about E130 in the Community were stripped of their code during the migration a while back. [[E130:help]] at least provides a list of available operators, but doesn't really explain what each operator does.
Here is what I've found for anyone who is interested, and so there is at least some introductory E130 info searchable in the Community.
The first thing to note about E130/S130 tags is that they evaluate based on Reverse Polish Notation. In RPN, the operator comes after the items it is evaluating, so 1 + 2 in RPN would be 1 2 +.
RPN expressions are also evaluated in stack structure, which basically means that new items added to the expression are stacked on top of the previous items. This is called a "push." A visual representation of the stack created by the expression 1 2 would be:
2
1
The operators remove (or "pop") a certain number of items from the top of the stack, evaluate them, and push the result to the stack. After the entire expression has been evaluated, the value on the top of the stack is returned. Ideally there would be only one value left. Here is an example expression, shamelessly stolen from Wikipedia:
5 1 2 + 4 * + 3 -
(Check out the Wikipedia article on Reverse Polish Notation for much more detailed information about RPN.)
As I mentioned earlier, [[E130:help]] or [[S130:help]] will render a list of available operators, but doesn't really explain what each operator does. I've muddled through the operators to try to figure this own on my own, and here's what I've come to understand about them.
Operators in pink are ones I'm not sure about the application/usefulness of.
Most of my examples use S130 rather than E130. This is because E-Tags are only used when one of the items in the expression is an S-Tag itself, so they render in the correct order for evaluation.
When evaluating S-Tags, it may also be necessary to enclose them in a T-Tag. The T-Tag documentation explains that T8 was made specifically for use with arguments to the E130 tag, but I also used T1 and T5 in this example.
Comments
-
This is awesome. That tag has been far too intimidating for far too long. Thanks, Chris!
0 -
Very well done. Another win./ I don't see any pink operators.
0 -
Brian Mucha:
Very well done. Another win./ I don't see any pink operators.
Brian Mucha wrote:
I don't see any pink operators.D'oh! It stripped out the background-color when I posted... I'll fix it now, thanks for pointing that out.
Edit: Ugh, it doesn't allow valign, either. I might reformat that later to make it more readable.
0 -
Chris Backus:
Brian Mucha wrote:
I don't see any pink operators.D'oh! It stripped out the background-color when I posted... I'll fix it now, thanks for pointing that out.
Edit: Ugh, it doesn't allow valign, either. I might reformat that later to make it more readable.
"Pops the previous item from the stack and returns it as a numeric value. In all tests I've done, though, numbers and strings are able to be used interchangeably."
What if you try with a operator that works differently on strings and numbers such as 'compare'?
Edit:
[[S130: "$30" "6" compare]] = -18
[[S130: "$30" number "6" compare]] = -3
0 -
Brian Mucha:
"Pops the previous item from the stack and returns it as a numeric value. In all tests I've done, though, numbers and strings are able to be used interchangeably."
What if you try with a operator that works differently on strings and numbers such as 'compare'?
Edit:
[[S130: "$30" "6" compare]] = -18
[[S130: "$30" number "6" compare]] = -3
Brian Mucha wrote:"Pops the previous item from the stack and returns it as a numeric value. In all tests I've done, though, numbers and strings are able to be used interchangeably."
What if you try with a operator that works differently on strings and numbers such as 'compare'?
Edit:
[[S130: "$30" "6" compare]] = -18
[[S130: "$30" number "6" compare]] = -3
That's an interesting point, I hadn't even considered symbols... In that example, though, you could also convert "6" to currency:
[[S130: "$30" currency "6" currency compare]] = -3
However, [[S130: "$30" "6" currency compare]] = -3 as well... Check out this post... (It's from 2009, so the formatting has gone a bit wonky.) About 1/3 into the post:
Linton Myers wrote:
The stack handles two types of data: a "string" (internally, a String) and a fixed point "number" (internally a Java double) with automatic conversion between types as needed and with generous interpretation when parsing numbers, e.g. "$5.20" will parse as 5.2 and "foo" will parse as 0.
In [[S130: "$30" "6" currency compare]], even though "$30" is technically text, the operator recognizes that both values appear to be currency and compares the first number, rather than the "$" symbol, to the number 6.Also, playing with that I've realized that the compare operator is comparing the decimal value of the first character in X to the decimal value of the first character in Y.:
[[S130: 0 "!" compare]] = 15 (0's decimal value is 48, !'s decimal value is 33, 48 - 33 =1 5)
(I'll update the first post to clarify this.)
0 -
Chris Backus:
Brian Mucha wrote:"Pops the previous item from the stack and returns it as a numeric value. In all tests I've done, though, numbers and strings are able to be used interchangeably."
What if you try with a operator that works differently on strings and numbers such as 'compare'?
Edit:
[[S130: "$30" "6" compare]] = -18
[[S130: "$30" number "6" compare]] = -3
That's an interesting point, I hadn't even considered symbols... In that example, though, you could also convert "6" to currency:
[[S130: "$30" currency "6" currency compare]] = -3
However, [[S130: "$30" "6" currency compare]] = -3 as well... Check out this post... (It's from 2009, so the formatting has gone a bit wonky.) About 1/3 into the post:
Linton Myers wrote:
The stack handles two types of data: a "string" (internally, a String) and a fixed point "number" (internally a Java double) with automatic conversion between types as needed and with generous interpretation when parsing numbers, e.g. "$5.20" will parse as 5.2 and "foo" will parse as 0.
In [[S130: "$30" "6" currency compare]], even though "$30" is technically text, the operator recognizes that both values appear to be currency and compares the first number, rather than the "$" symbol, to the number 6.Also, playing with that I've realized that the compare operator is comparing the decimal value of the first character in X to the decimal value of the first character in Y.:
[[S130: 0 "!" compare]] = 15 (0's decimal value is 48, !'s decimal value is 33, 48 - 33 =1 5)
(I'll update the first post to clarify this.)
Can this PLEASE be added to the documentation at https://secure2.convio.net/customer/luminate_online/v11/s-tags/S-Tags.htm??? Pretty please?
This makes me sad: https://secure2.convio.net/customer/luminate_online/v11/s-tags/S-Tags.htm#search-S130
Your search for "S130" returned 0 result(s)
0 -
Bo Bell:
Can this PLEASE be added to the documentation at https://secure2.convio.net/customer/luminate_online/v11/s-tags/S-Tags.htm??? Pretty please?
This makes me sad: https://secure2.convio.net/customer/luminate_online/v11/s-tags/S-Tags.htm#search-S130
Your search for "S130" returned 0 result(s)
"This makes me sad"
I LOLed.
0 -
Brian Mucha:
"This makes me sad"
I LOLed.
Kent is passing along Bo's request for more documentation on it.
However, this tag is probably not well documented for a couple reasons:
1) It is complicated so not that many people even attempt to use it
2) It is mainly used by engineering though over the last 5 years some of the more advanced web dev folks in our services team have been using it more often.
3) It can bring your site or a server down under a special set of circumstances. I've seen it happen by accident when one of our web developers who was making something for a client's campaign.
He was trying to do something a little nutty so if you are just using it for simple math and items like Chris mentioned you should have no problems.
Ken
0 -
Ken Cantu:
Kent is passing along Bo's request for more documentation on it.
However, this tag is probably not well documented for a couple reasons:
1) It is complicated so not that many people even attempt to use it
2) It is mainly used by engineering though over the last 5 years some of the more advanced web dev folks in our services team have been using it more often.
3) It can bring your site or a server down under a special set of circumstances. I've seen it happen by accident when one of our web developers who was making something for a client's campaign.
He was trying to do something a little nutty so if you are just using it for simple math and items like Chris mentioned you should have no problems.
Ken
I'm making a thermometer for a TeamRaiser coaching email using the [[S48:1520
ct-of-goal]] tag .
Here's what I want:
But it turns out that if pct-of-goal is 0, the thermo doesn't render correctly in most mail clients. Additionally it can return values higher than 100 when the goal as been exceeded, which also messes things up.
I spent quite a while fooling with E130 and multiple ternarys, trying to keep the value between 1 and 99. It turned out to be so simple I thought I'd post it.
[[E130:[[S48:1520
ct-of-goal]] 1 max 99 min]]
Here's what it does:
[[S48:1520
ct-of-goal]] 1 max
Take the percent of goal and compare with 1 and return the higher number. This eliminates 0 values.
(RESULT) 99 min
Take the result of the above and compare with 99 and return the lower number. This eliminates 100 and higher values.
So here's my final code:
<table width="100%" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;">
<tr>
<td style="background-color: #026BBB; width:[[E130:[[S48:1520ct-of-goal]] 1 max 100 min]]%;"><img alt="" style="display: block;" src="http://[[S29
OMAIN]]/_resources-email/_common/images/nothing.gif" border="0" width="1" height="10" /></td>
<td style="background-color: #FFFFFF;"></td>
</tr>
</table>S130 / Polish Notation - so cool.
0 -
Brian Mucha:
I'm making a thermometer for a TeamRaiser coaching email using the [[S48:1520
ct-of-goal]] tag .
Here's what I want:
But it turns out that if pct-of-goal is 0, the thermo doesn't render correctly in most mail clients. Additionally it can return values higher than 100 when the goal as been exceeded, which also messes things up.
I spent quite a while fooling with E130 and multiple ternarys, trying to keep the value between 1 and 99. It turned out to be so simple I thought I'd post it.
[[E130:[[S48:1520
ct-of-goal]] 1 max 99 min]]
Here's what it does:
[[S48:1520
ct-of-goal]] 1 max
Take the percent of goal and compare with 1 and return the higher number. This eliminates 0 values.
(RESULT) 99 min
Take the result of the above and compare with 99 and return the lower number. This eliminates 100 and higher values.
So here's my final code:
<table width="100%" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;">
<tr>
<td style="background-color: #026BBB; width:[[E130:[[S48:1520ct-of-goal]] 1 max 100 min]]%;"><img alt="" style="display: block;" src="http://[[S29
OMAIN]]/_resources-email/_common/images/nothing.gif" border="0" width="1" height="10" /></td>
<td style="background-color: #FFFFFF;"></td>
</tr>
</table>S130 / Polish Notation - so cool.
More "gold" from Mr. Mucha!!!!!! Now how about that tree that grows money idea? Can you figure that one out? lol Happy holidays my friend!
Kent
0 -
Kent Gilliam:
More "gold" from Mr. Mucha!!!!!! Now how about that tree that grows money idea? Can you figure that one out? lol Happy holidays my friend!
Kent
Hey Brian,
Already have some requests for a screenshot of this in action. Any way you could post a screenshot of your email?
Kent
0 -
Kent Gilliam:
Hey Brian,
Already have some requests for a screenshot of this in action. Any way you could post a screenshot of your email?
Kent
https://litmus.com/pub/3616ee0
The attachment still shows an old bug with the Days Left value, but it has the Personal Page Not Updated alert and a bunch of custom achievement badges I created, which do not appear in the Litmus test.
0 -
REPOST WITH S-TAGS FIXED
I'm making a thermometer for a TeamRaiser coaching email using the [[S48:1520:pct-of-goal]] tag .Here's what I want:
But it turns out that if pct-of-goal is 0, the thermo doesn't render correctly in most mail clients. Additionally it can return values higher than 100 when the goal as been exceeded, which also messes things up.
I spent quite a while fooling with E130 and multiple ternarys, trying to keep the value between 1 and 99. It turned out to be so simple I thought I'd post it.
[[E130:[[S48:1520:pct-of-goal]] 1 max 99 min]]
Here's what it does:
[[S48:1520:pct-of-goal]] 1 max
Take the percent of goal and compare with 1 and return the higher number. This eliminates 0 values.
(RESULT) 99 min
Take the result of the above and compare with 99 and return the lower number. This eliminates 100 and higher values.
So here's my final code:
<table width="100%" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;">
<tr>
<td style="background-color: #026BBB; width:[[E130:[[S48:1520ct-of-goal]] 1 max 100 min]]%;"><img alt="" style="display: block;" src="http://[[S29:DOMAIN]]/_resources-email/_common/images/nothing.gif" border="0" width="1" height="10" /></td>
<td style="background-color: #FFFFFF;"></td>
</tr>
</table>S130 / Polish Notation - so cool.
2
Categories
- All Categories
- Shannon parent
- shannon 2
- shannon 1
- 21 Advocacy DC Users Group
- 14 BBCRM PAG Discussions
- 89 High Education Program Advisory Group (HE PAG)
- 28 Luminate CRM DC Users Group
- 8 DC Luminate CRM Users Group
- Luminate PAG
- 5.9K Blackbaud Altru®
- 58 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 409 bbcon®
- 2.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- donorCentrics®
- 1.1K Blackbaud eTapestry®
- 2.8K Blackbaud Financial Edge NXT®
- 1.1K Blackbaud Grantmaking™
- 527 Education Management Solutions for Higher Education
- 1 JustGiving® from Blackbaud®
- 4.6K Education Management Solutions for K-12 Schools
- Blackbaud Luminate Online & Blackbaud TeamRaiser
- 16.4K Blackbaud Raiser's Edge NXT®
- 4.1K SKY Developer
- 547 ResearchPoint™
- 151 Blackbaud Tuition Management™
- 61 everydayhero
- 3 Campaign Ideas
- 58 General Discussion
- 115 Blackbaud ID
- 87 K-12 Blackbaud ID
- 6 Admin Console
- 949 Organizational Best Practices
- 353 The Tap (Just for Fun)
- 235 Blackbaud Community Feedback Forum
- 55 Admissions Event Management EAP
- 18 MobilePay Terminal + BBID Canada EAP
- 36 EAP for New Email Campaigns Experience in Blackbaud Luminate Online®
- 109 EAP for 360 Student Profile in Blackbaud Student Information System
- 41 EAP for Assessment Builder in Blackbaud Learning Management System™
- 9 Technical Preview for SKY API for Blackbaud CRM™ and Blackbaud Altru®
- 55 Community Advisory Group
- 46 Blackbaud Community Ideas
- 26 Blackbaud Community Challenges
- 7 Security Testing Forum
- 3 Blackbaud Staff Discussions
- 1 Blackbaud Partners Discussions
- 1 Blackbaud Giving Search™
- 35 EAP Student Assignment Details and Assignment Center
- 39 EAP Core - Roles and Tasks
- 59 Blackbaud Community All-Stars Discussions
- 20 Blackbaud Raiser's Edge NXT® Online Giving EAP
- Diocesan Blackbaud Raiser’s Edge NXT® User’s Group
- 2 Blackbaud Consultant’s Community
- 43 End of Term Grade Entry EAP
- 92 EAP for Query in Blackbaud Raiser's Edge NXT®
- 38 Standard Reports for Blackbaud Raiser's Edge NXT® EAP
- 12 Payments Assistant for Blackbaud Financial Edge NXT® EAP
- 6 Ask an All Star (Austen Brown)
- 8 Ask an All-Star Alex Wong (Blackbaud Raiser's Edge NXT®)
- 1 Ask an All-Star Alex Wong (Blackbaud Financial Edge NXT®)
- 6 Ask an All-Star (Christine Robertson)
- 21 Ask an Expert (Anthony Gallo)
- Blackbaud Francophone Group
- 22 Ask an Expert (David Springer)
- 4 Raiser's Edge NXT PowerUp Challenge #1 (Query)
- 6 Ask an All-Star Sunshine Reinken Watson and Carlene Johnson
- 4 Raiser's Edge NXT PowerUp Challenge: Events
- 14 Ask an All-Star (Elizabeth Johnson)
- 7 Ask an Expert (Stephen Churchill)
- 2025 ARCHIVED FORUM POSTS
- 322 ARCHIVED | Financial Edge® Tips and Tricks
- 164 ARCHIVED | Raiser's Edge® Blog
- 300 ARCHIVED | Raiser's Edge® Blog
- 441 ARCHIVED | Blackbaud Altru® Tips and Tricks
- 66 ARCHIVED | Blackbaud NetCommunity™ Blog
- 211 ARCHIVED | Blackbaud Target Analytics® Tips and Tricks
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- Luminate CRM DC Users Group
- 225 ARCHIVED | Blackbaud eTapestry® Tips and Tricks
- 1 Blackbaud eTapestry® Know How Blog
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
- 1 Blackbaud K-12 Education Solutions™ Blog
- 280 ARCHIVED | Mixed Community Announcements
- 3 ARCHIVED | Blackbaud Corporations™ & Blackbaud Foundations™ Hosting Status
- 1 npEngage
- 24 ARCHIVED | K-12 Announcements
- 15 ARCHIVED | FIMS Host*Net Hosting Status
- 23 ARCHIVED | Blackbaud Outcomes & Online Applications (IGAM) Hosting Status
- 22 ARCHIVED | Blackbaud DonorCentral Hosting Status
- 14 ARCHIVED | Blackbaud Grantmaking™ UK Hosting Status
- 117 ARCHIVED | Blackbaud CRM™ and Blackbaud Internet Solutions™ Announcements
- 50 Blackbaud NetCommunity™ Blog
- 169 ARCHIVED | Blackbaud Grantmaking™ Tips and Tricks
- Advocacy DC Users Group
- 718 Community News
- Blackbaud Altru® Hosting Status
- 104 ARCHIVED | Member Spotlight
- 145 ARCHIVED | Hosting Blog
- 149 JustGiving® from Blackbaud® Blog
- 97 ARCHIVED | bbcon® Blogs
- 19 ARCHIVED | Blackbaud Luminate CRM™ Announcements
- 161 Luminate Advocacy News
- 187 Organizational Best Practices Blog
- 67 everydayhero Blog
- 52 Blackbaud SKY® Reporting Announcements
- 17 ARCHIVED | Blackbaud SKY® Reporting for K-12 Announcements
- 3 Luminate Online Product Advisory Group (LO PAG)
- 81 ARCHIVED | JustGiving® from Blackbaud® Tips and Tricks
- 1 ARCHIVED | K-12 Conference Blog
- Blackbaud Church Management™ Announcements
- ARCHIVED | Blackbaud Award Management™ and Blackbaud Stewardship Management™ Announcements
- 1 Blackbaud Peer-to-Peer Fundraising™, Powered by JustGiving® Blogs
- 39 Tips, Tricks, and Timesavers!
- 56 Blackbaud Church Management™ Resources
- 154 Blackbaud Church Management™ Announcements
- 1 ARCHIVED | Blackbaud Church Management™ Tips and Tricks
- 11 ARCHIVED | Blackbaud Higher Education Solutions™ Announcements
- 7 ARCHIVED | Blackbaud Guided Fundraising™ Blog
- 2 Blackbaud Fundraiser Performance Management™ Blog
- 9 Foundations Events and Content
- 14 ARCHIVED | Blog Posts
- 2 ARCHIVED | Blackbaud FIMS™ Announcement and Tips
- 59 Blackbaud Partner Announcements
- 10 ARCHIVED | Blackbaud Impact Edge™ EAP Blogs
- 1 Community Help Blogs
- Diocesan Blackbaud Raiser’s Edge NXT® Users' Group
- Blackbaud Consultant’s Community
- Blackbaud Francophone Group
- 1 BLOG ARCHIVE CATEGORY
- Blackbaud Community™ Discussions
- 8.3K Blackbaud Luminate Online® & Blackbaud TeamRaiser® Discussions
- 5.7K Jobs Board