CINXE.COM

LISTSERV at Work - Issue 3, 2009

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head><script type="text/javascript" src="/_static/js/bundle-playback.js?v=HxkREWBo" charset="utf-8"></script> <script type="text/javascript" src="/_static/js/wombat.js?v=txqj7nKC" charset="utf-8"></script> <script>window.RufflePlayer=window.RufflePlayer||{};window.RufflePlayer.config={"autoplay":"on","unmuteOverlay":"hidden"};</script> <script type="text/javascript" src="/_static/js/ruffle/ruffle.js"></script> <script type="text/javascript"> __wm.init("http://web.archive.org/web"); __wm.wombat("https://lsoft.com/news/techtipMAE-issue3-2009-us.asp","20240305134025","http://web.archive.org/","web","/_static/", "1709646025"); </script> <link rel="stylesheet" type="text/css" href="/_static/css/banner-styles.css?v=S1zqJCYt" /> <link rel="stylesheet" type="text/css" href="/_static/css/iconochive.css?v=3PDvdIFv" /> <!-- End Wayback Rewrite JS Include --> <title>LISTSERV at Work - Issue 3, 2009</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> </head> <body bgcolor="#ffffff"> <table align="center"> <tr><td> <a name="TOP"></a> <table width="706" cellspacing="0" cellpadding="0" border="0"> <tr> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#ffffff" width="698" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> </tr> <tr> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#fdfdfd" width="1" height="1"></td> <td bgcolor="#fbfbfb" width="698" height="1"></td> <td bgcolor="#fdfdfd" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> </tr> <tr> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#fdfdfd" width="1" height="1"></td> <td bgcolor="#fdfdfd" width="1" height="1"></td> <td bgcolor="#fbfbfb" width="1" height="1"></td> <td bgcolor="#f4f4f4" width="698" height="1"></td> <td bgcolor="#fbfbfb" width="1" height="1"></td> <td bgcolor="#fdfdfd" width="1" height="1"></td> <td bgcolor="#fdfdfd" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> </tr> <tr> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#fdfdfd" width="1" height="1"></td> <td bgcolor="#f9f9f9" width="1" height="1"></td> <td bgcolor="#ebebeb" width="1" height="1"></td> <td bgcolor="#ebebeb" width="698" height="1"></td> <td bgcolor="#ebebeb" width="1" height="1"></td> <td bgcolor="#f9f9f9" width="1" height="1"></td> <td bgcolor="#fdfdfd" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> </tr> <tr> <td bgcolor="#fbfbfb" width="1" height="1"></td> <td bgcolor="#f4f4f4" width="1" height="1"></td> <td bgcolor="#eaeaea" width="1" height="1"></td> <td bgcolor="#dfdfdf" width="1" height="1"></td> <td valign="top"> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td bgcolor="#ff9e0b" width="349" height="64"><a href="issue3-2009-us.asp"><img src="/web/20240305134025im_/https://lsoft.com/news/issue3-2009/header1a.jpg" width="349" height="64" alt="LISTSERV at Work" title="LISTSERV at Work" border="0" style="display:block"></a></td> <td bgcolor="#ff9e0b" width="349" height="64"><a href="/web/20240305134025/https://lsoft.com/"><img src="/web/20240305134025im_/https://lsoft.com/news/issue3-2009/header1b.jpg" width="349" height="64" alt="L-Soft" title="L-Soft" border="0" style="display:block"></a></td> </tr> <tr> <td bgcolor="#ffd698" width="349" height="20"><img src="/web/20240305134025im_/https://lsoft.com/news/issue3-2009/header2a.jpg" width="349" height="20" alt="" border="0" style="display:block"></td> <td bgcolor="#ffd698" width="349" height="20"><img src="/web/20240305134025im_/https://lsoft.com/news/issue3-2009/header2b.jpg" width="349" height="20" alt="Issue 3, 2009" title="Issue 3, 2009" border="0" style="display:block"></td> </tr> <tr> <td bgcolor="#fff0db" width="349" height="20"><img src="/web/20240305134025im_/https://lsoft.com/news/issue3-2009/header3a.jpg" width="349" height="20" alt="" border="0" style="display:block"></td> <td bgcolor="#fff0db" width="349" height="20"><img src="/web/20240305134025im_/https://lsoft.com/news/issue3-2009/header3b.jpg" width="349" height="20" alt="" border="0" style="display:block"></td> </tr> <tr> <td bgcolor="#ffffff" width="349" height="20"><p style="font-family: verdana, arial, helvetica, sans-serif; font-size:14px; color: #000000; font-weight: bold">&nbsp;&nbsp;&nbsp;Tech Tip: LISTSERV Maestro</p></td> <td bgcolor="#ffffff" width="349" height="20"><img src="/web/20240305134025im_/https://lsoft.com/news/issue3-2009/header4.jpg" width="349" height="20" alt="" border="0" style="display:block"></td> </tr> <tr><td bgcolor="#ffffff" colspan="2"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr><td width="100%" valign="top"> <table width="100%" cellpadding="15" cellspacing="0" border="0"><tr><td> <hr style="width: 100%; height: 1px; color: #999999; border-style: dotted; border-color: #999999; border-width: 1px 0px 0px 0px; padding-top: 1px; padding-bottom: 1px"> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000; font-weight: bold">Q: Is it possible to add a "timestamp" profile field to a dataset that is updated whenever any of the other profile fields are changed?</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #666666">Answer by Johannes Hubert and Holly Taylor<br/>LISTSERV Maestro Project Manager and Technical Writer,<br/>L-Soft</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">For many data administrators, keeping track of their subscribers' data and its accuracy is a major concern. Simply having a way to keep track of the last date and time that a specific record was updated would be beneficiary. Because of this need, LISTSERV Maestro 4.0-5 and later has made it possible for you to create a "timestamp" that helps you keep your subscriber information up-to-date. This timestamp is created by adding a special derivation rule formula to a derived profile field. </p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">To define a timestamp profile field for a specific dataset, go to the Recipient Dataset Details screen for that dataset, and then select the <b>Dataset</b> menu from the Toolbar and select <b>Edit Dataset Settings</b>. The Recipient Dataset Definition wizard opens. On the Profile Fields screen, click the <b>Add Field</b> link. Enter a suitable <b>Name</b> and <b>Display Name</b>, for example "CHANGESTAMP" and "Last Updated". Click the <b>Data Type</b> drop-down arrow and select <b>Derived</b>, and then click the <b>Input Type</b> drop-down arrow and select <b>Hidden</b>. (This input type ensures that subscribers won't see this change timestamp on their pages). Click <b>[Next] </b> to define the derivation rule.</p> <p align="center"><img src="/web/20240305134025im_/https://lsoft.com/news/issue3-2009/techtip-mae1.gif" alt="" border="0" width="660" height="320"></p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">On the Profile Field Details screen, click the Derivation Rules tab. For the newly added CHANGESTAMP field, click the <b>Define</b> link.</p> <p align="center"><img src="/web/20240305134025im_/https://lsoft.com/news/issue3-2009/techtip-mae2.gif" alt="" border="0" width="580" height="310"></p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">In the Derivation Rule window, set the derivation rule of this new field to the following formula for the derivation rule:</p> <p style="font-family: courier; font-size:13px; color: #000000">If(true, CurrentMillis, Length(FIELD_LIST))</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">where you replace FIELD_LIST with a "+" concatenation of all other profile fields in your dataset (or hosted list), like this:</p> <p style="font-family: courier; font-size:13px; color: #000000">&amp;FIELD1; + &amp;FIELD2; +&amp;FIELD3; + [etc]...</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">However, you need to observe a few rules depending on each field's type so that this concatenation list results in a correct formula syntax and is accepted by the system:</p> <ul> <li style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000"><b>Text and Mandatory field types</b> &ndash; Nothing special to observe, just add the field to the list, i.e. write &amp;FIELD;</li> <li style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000"><b>Text and Optional field types</b> &ndash; Use the optional-field syntax to add the field, i.e. write [&amp;FIELD; ""]</li> <li style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000"><b>Number and Mandatory field types</b> &ndash; Nothing special to observe, just add the field to the list, i.e. write &amp;FIELD;</li> <li style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000"><b>Number and Optional field types</b> &ndash; Use the optional-field syntax to add the field, i.e. write [&amp;FIELD; 0]</li> <li style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000"><b>Boolean field types</b> &ndash; Wrap the field in the ToNum() function, i.e. write ToNum(&amp;FIELD;)</li> <li style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000"><b>Tracking Permission field types</b> &ndash; See "Boolean field types"</li> <li style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000"><b>Single Select (Mandatory or Optional) field types</b> &ndash; Nothing special to observe, just add the field to the list, i.e. write &amp;FIELD;</li> <li style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000"><b>Multiple Select (Mandatory or Optional) field types</b> &ndash; Wrap the field in the Count() function, i.e. write Count(&amp;FIELD;)</li> <li style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000"><b>Derived field types</b> &ndash; Does not need to be mentioned in the formula at all, i.e. just leave it out.</li> </ul> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:14px; color: #000000; font-weight: bold">For Example</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">Assume that you have the following profile fields:</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">TEXTOPT (optional text)<br/>TEXTMAND (mandatory text)<br/>NUMOPT (optional number)<br/>NUMMAND (mandatory number)<br/>BOOL (boolean)<br/>SINGLE (single select)<br/>MULTI (multiple select)</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">Then, the derivation formula would look like this:</p> <p style="font-family: courier; font-size:13px; color: #000000">If(true, CurrentMillis, Length([&amp;TEXTOPT; ""] + &amp;TEXTMAND; + [&amp;NUMOPT; 0] + &amp;NUMMAND; + ToNum(&amp;BOOL;) + &amp;SINGLE; + Count(&amp;MULTI;)))</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">Or, the same with linebreaks for better readability:</p> <pre> If(true, CurrentMillis, Length([&amp;TEXTOPT; ""] + &amp;TEXTMAND; + [&amp;NUMOPT; 0] + &amp;NUMMAND; + ToNum(&amp;BOOL;) + &amp;SINGLE; + Count(&amp;MULTI;) ) ) </pre> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000"><b>Restriction:</b> It is not possible to have a derived field in a hosted list that references (in its formula) profile fields that are defined in the dataset. Similarly, it is not possible to have a derived field in a dataset that references (in its formula) profile fields that are defined in any of the hosted lists of the dataset.</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">Therefore, if you have both profile fields in the dataset (i.e. shared fields for all lists) and individual profile fields in a hosted list, then you can <b>not</b> have a change-timestamp for all of these profile fields (from dataset and list) at once.</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">Your only option is to have two change-timestamps: One for the dataset profile fields (defined as a derived field in the dataset, referencing all other dataset profile fields, but no list profile fields), and one for the list profile fields (defined as a derived field in the list, referencing all other list profile fields, but no dataset profile fields).</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:14px; color: #000000; font-weight: bold">Important Notes about the Derivation Rule Formula</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">It is important to know that a derived field's value is recalculated whenever the value of any of the other profile fields that are mentioned in the derivation rule formula changes. Therefore, what we need to come up with is a formula, whose result is the current time (so that it can be used as a timestamp), but which is also recalculated whenever any of the (other) profile fields are changed. Therefore, the formula must not only result in the current time, but it also must mention all the other profile fields somewhere.</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">This is what the above formula does, using the "If" function: </p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">1. The first argument of the function is the condition. In this case, the condition is set to a constant "true".</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">2. The second argument of the function is the result that is to be returned if the condition is true. In this case, since the condition is always "true" (see above), the value of the second argument is always the value that is returned by the function. Therefore, we simply set "CurrentMillis" as the second argument, which will have the effect that the second argument is equal to the current time; and, since the second argument will always be returned as the result of the If-function itself (because of the constant "true" condition), the result of the whole If-function (and thus the whole derivation rule formula) will be the current time, just as we need it for our timestamp.</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000">3. The third argument of the function is the result that is to be returned if the condition is false. In this case, since the condition is always "true" (see above), this means that the value of this second argument will never be returned. So we are free to put into this third argument whatever we want (as long as it is syntactically valid and results in a Number). We take advantage of this (i.e. that the third argument is always ignored). As said above, to make the derivation rule recalculate its value (to the current time) each time any of the other profile fields are changed, we need to mention all of these other profile fields somewhere in the formula, but we don't want them to actually influence the return value of the formula (which is supposed to be the current time). And, since the third argument is ignored, we can use it for exactly this purpose, i.e. to mention all the other profile fields without influencing the result of the formula, which is the purpose of the "FIELD_LIST".</p> <p style="font-family: verdana, arial, helvetica, sans-serif; font-size:13px; color: #000000"><b>Note:</b> Notice how we put an additional "Length()" function around the "FIELD_LIST". This ensures that the data type of the value from "FIELD_LIST" is of the Number type to match the data type of "CurrentMillis", which is also Number. This is because the "FIELD_LIST" will be a concatenation of all other profile fields (to "mention" them in the formula); and, the data type of such a concatenation is usually Text, which is why we put the "Length()" function around it to convert the Text type back into a Number type.</p> </td></tr></table> </td></tr> </table> <br/> <table width="100%" cellpadding="15" cellspacing="0" border="0" bgcolor="#ffd698" background="/web/20240305134025im_/https://lsoft.com/news/issue3-2009/gradient.jpg"><tr> <td height="50"><img src="/web/20240305134025im_/https://lsoft.com/news/issue3-2009/blank.gif" alt=""></td><td height="50" align="right"><p style="font-family: verdana, arial, helvetica, sans-serif; font-size:11px; color: #000000; font-weight: bold">&copy; L-Soft 2009. All Rights Reserved.</p></td> </tr></table> </td></tr> </table> </td> <td bgcolor="#dfdfdf" width="1" height="1"></td> <td bgcolor="#eaeaea" width="1" height="1"></td> <td bgcolor="#f4f4f4" width="1" height="1"></td> <td bgcolor="#fbfbfb" width="1" height="1"></td> </tr> <tr> <td bgcolor="#fefefe" width="1" height="1"></td> <td bgcolor="#fbfbfb" width="1" height="1"></td> <td bgcolor="#f8f8f8" width="1" height="1"></td> <td bgcolor="#e0e0e0" width="1" height="1"></td> <td bgcolor="#e0e0e0" width="698" height="1"></td> <td bgcolor="#e0e0e0" width="1" height="1"></td> <td bgcolor="#f8f8f8" width="1" height="1"></td> <td bgcolor="#fbfbfb" width="1" height="1"></td> <td bgcolor="#fefefe" width="1" height="1"></td> </tr> <tr> <td bgcolor="#fefefe" width="1" height="1"></td> <td bgcolor="#fdfdfd" width="1" height="1"></td> <td bgcolor="#fafafa" width="1" height="1"></td> <td bgcolor="#f7f7f7" width="1" height="1"></td> <td bgcolor="#ebebeb" width="698" height="1"></td> <td bgcolor="#f7f7f7" width="1" height="1"></td> <td bgcolor="#fafafa" width="1" height="1"></td> <td bgcolor="#fdfdfd" width="1" height="1"></td> <td bgcolor="#fefefe" width="1" height="1"></td> </tr> <tr> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#fefefe" width="1" height="1"></td> <td bgcolor="#fcfcfc" width="1" height="1"></td> <td bgcolor="#fafafa" width="1" height="1"></td> <td bgcolor="#f3f3f3" width="698" height="1"></td> <td bgcolor="#fafafa" width="1" height="1"></td> <td bgcolor="#fcfcfc" width="1" height="1"></td> <td bgcolor="#fefefe" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> </tr> <tr> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#fefefe" width="1" height="1"></td> <td bgcolor="#fefefe" width="1" height="1"></td> <td bgcolor="#fdfdfd" width="1" height="1"></td> <td bgcolor="#f9f9f9" width="698" height="1"></td> <td bgcolor="#fdfdfd" width="1" height="1"></td> <td bgcolor="#fefefe" width="1" height="1"></td> <td bgcolor="#fefefe" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> </tr> <tr> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#fefefe" width="1" height="1"></td> <td bgcolor="#fdfdfd" width="698" height="1"></td> <td bgcolor="#fefefe" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> <td bgcolor="#ffffff" width="1" height="1"></td> </tr> </table> </td></tr> </table> <script async src="http://web.archive.org/web/20240305134025js_/https://www.googletagmanager.com/gtag/js?id=UA-3167554-2"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-3167554-2'); </script> </body> </html><!-- FILE ARCHIVED ON 13:40:25 Mar 05, 2024 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 22:53:36 Nov 25, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). --> <!-- playback timings (ms): captures_list: 0.552 exclusion.robots: 0.027 exclusion.robots.policy: 0.017 esindex: 0.011 cdx.remote: 5.238 LoadShardBlock: 309.941 (3) PetaboxLoader3.datanode: 336.999 (4) PetaboxLoader3.resolve: 126.793 (2) load_resource: 172.216 -->

Pages: 1 2 3 4 5 6 7 8 9 10