<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Alternating Color Based on Alternating Data</title>
	<atom:link href="http://sixfriedrice.com/wp/alternating-colors/feed/" rel="self" type="application/rss+xml" />
	<link>http://sixfriedrice.com/wp/alternating-colors/</link>
	<description>smart business solutions</description>
	<lastBuildDate>Sun, 29 Jan 2012 19:10:42 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: daniele</title>
		<link>http://sixfriedrice.com/wp/alternating-colors/comment-page-1/#comment-2021</link>
		<dc:creator>daniele</dc:creator>
		<pubDate>Thu, 30 Dec 2010 14:26:50 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/alternating-colors/#comment-2021</guid>
		<description>Geoff:

I used your powerful formula in many situations but now I discovered that if the found set is in the order of around 400 records, then starting from the record number 178 the field result became a &quot;?&quot; instead of 0 or 1, and starting from the record 180 you can&#039;t even enter the tab into the field. Any idea?</description>
		<content:encoded><![CDATA[<p>Geoff:</p>
<p>I used your powerful formula in many situations but now I discovered that if the found set is in the order of around 400 records, then starting from the record number 178 the field result became a &#8220;?&#8221; instead of 0 or 1, and starting from the record 180 you can&#8217;t even enter the tab into the field. Any idea?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/alternating-colors/comment-page-1/#comment-1477</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Thu, 08 Jan 2009 15:01:05 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/alternating-colors/#comment-1477</guid>
		<description>Cesar:

On using a global and calc in versions before 9, excellent idea. That would work great.

As for coloring simply based on the day name, in some cases that would work, but it is a slightly different result. See my previous (6-19-2008) comment.

Geoff</description>
		<content:encoded><![CDATA[<p>Cesar:</p>
<p>On using a global and calc in versions before 9, excellent idea. That would work great.</p>
<p>As for coloring simply based on the day name, in some cases that would work, but it is a slightly different result. See my previous (6-19-2008) comment.</p>
<p>Geoff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cesar Morales</title>
		<link>http://sixfriedrice.com/wp/alternating-colors/comment-page-1/#comment-1473</link>
		<dc:creator>Cesar Morales</dc:creator>
		<pubDate>Thu, 08 Jan 2009 07:39:15 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/alternating-colors/#comment-1473</guid>
		<description>You can also use the date day names to display corresponding colors either through an unstored calc field that evaluates global graphic repeating field holding different colors, or if using FileMaker 9 or above with Conditional Formatting and a background color for each different date&#039;s day.</description>
		<content:encoded><![CDATA[<p>You can also use the date day names to display corresponding colors either through an unstored calc field that evaluates global graphic repeating field holding different colors, or if using FileMaker 9 or above with Conditional Formatting and a background color for each different date&#8217;s day.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/alternating-colors/comment-page-1/#comment-1222</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Thu, 19 Jun 2008 21:29:50 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/alternating-colors/#comment-1222</guid>
		<description>@dick:

That will work well if you&#039;re certain every sequential day will be represented in the list. But it breaks down if you have gaps. For instance, suppose you have 3 records on January 3rd, none for the 4th, and then a few more for the 5th. In that case, the two sets would be side-by-side and of the same color.

Geoff</description>
		<content:encoded><![CDATA[<p>@dick:</p>
<p>That will work well if you&#8217;re certain every sequential day will be represented in the list. But it breaks down if you have gaps. For instance, suppose you have 3 records on January 3rd, none for the 4th, and then a few more for the 5th. In that case, the two sets would be side-by-side and of the same color.</p>
<p>Geoff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick</title>
		<link>http://sixfriedrice.com/wp/alternating-colors/comment-page-1/#comment-1218</link>
		<dc:creator>Dick</dc:creator>
		<pubDate>Mon, 16 Jun 2008 05:48:50 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/alternating-colors/#comment-1218</guid>
		<description>err.. with an additional proviso for months ending odd</description>
		<content:encoded><![CDATA[<p>err.. with an additional proviso for months ending odd</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick</title>
		<link>http://sixfriedrice.com/wp/alternating-colors/comment-page-1/#comment-1217</link>
		<dc:creator>Dick</dc:creator>
		<pubDate>Mon, 16 Jun 2008 05:46:15 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/alternating-colors/#comment-1217</guid>
		<description>For 2 colours why not just do a calc on odd or even day numbers
and go straight to Conditional formatting from there.</description>
		<content:encoded><![CDATA[<p>For 2 colours why not just do a calc on odd or even day numbers<br />
and go straight to Conditional formatting from there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/alternating-colors/comment-page-1/#comment-1205</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Sat, 07 Jun 2008 00:55:11 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/alternating-colors/#comment-1205</guid>
		<description>@david:

Yes, if the data isn&#039;t sorted it &quot;works&quot; in that contiguous ranges are still colored properly, but it doesn&#039;t do what you describe. If you want that behavior, you might consider using a conditional formatting approach based on the date itself. For instance, imagine these 5 conditional formatting rules:

&lt;pre&gt;&lt;code&gt;Mod(GetAsNumber(DATE_FIELD), 5) = 0
Mod(GetAsNumber(DATE_FIELD), 5) = 1
Mod(GetAsNumber(DATE_FIELD), 5) = 2
Mod(GetAsNumber(DATE_FIELD), 5) = 3
Mod(GetAsNumber(DATE_FIELD), 5) = 4&lt;/code&gt;&lt;/pre&gt;

This would have the problem that two side-by-side dates that are an even multiple of 5 days apart would be the same color, which might be problematic. But I&#039;m not sure how possible it would be to fix that problem and still keep same-color-for-same-date behavior.

You could also color code based on the number of days in the past, which might be cool. One color for 0 to 3 days, another for 4 to 10, etc... Something like that.

Anyway, thanks to Todd for inspiring this. It is a very cool idea to color code rows based on data similarities.

Geoff</description>
		<content:encoded><![CDATA[<p>@david:</p>
<p>Yes, if the data isn&#8217;t sorted it &#8220;works&#8221; in that contiguous ranges are still colored properly, but it doesn&#8217;t do what you describe. If you want that behavior, you might consider using a conditional formatting approach based on the date itself. For instance, imagine these 5 conditional formatting rules:</p>
<pre><code>Mod(GetAsNumber(DATE_FIELD), 5) = 0
Mod(GetAsNumber(DATE_FIELD), 5) = 1
Mod(GetAsNumber(DATE_FIELD), 5) = 2
Mod(GetAsNumber(DATE_FIELD), 5) = 3
Mod(GetAsNumber(DATE_FIELD), 5) = 4</code></pre>
<p>This would have the problem that two side-by-side dates that are an even multiple of 5 days apart would be the same color, which might be problematic. But I&#8217;m not sure how possible it would be to fix that problem and still keep same-color-for-same-date behavior.</p>
<p>You could also color code based on the number of days in the past, which might be cool. One color for 0 to 3 days, another for 4 to 10, etc&#8230; Something like that.</p>
<p>Anyway, thanks to Todd for inspiring this. It is a very cool idea to color code rows based on data similarities.</p>
<p>Geoff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Zakary</title>
		<link>http://sixfriedrice.com/wp/alternating-colors/comment-page-1/#comment-1200</link>
		<dc:creator>David Zakary</dc:creator>
		<pubDate>Fri, 06 Jun 2008 21:30:04 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/alternating-colors/#comment-1200</guid>
		<description>That works better. Works perfectly if the data is sorted by the Date field. Works ok if unsorted. 

Ideally (this is based on what my client wanted) is that if there were duplicated, but non-contiguous, dates they would show up the same colour. In this version they take on the next value in the custom formatting series.

Thanks for your work on this</description>
		<content:encoded><![CDATA[<p>That works better. Works perfectly if the data is sorted by the Date field. Works ok if unsorted. </p>
<p>Ideally (this is based on what my client wanted) is that if there were duplicated, but non-contiguous, dates they would show up the same colour. In this version they take on the next value in the custom formatting series.</p>
<p>Thanks for your work on this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/alternating-colors/comment-page-1/#comment-1199</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Fri, 06 Jun 2008 20:33:13 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/alternating-colors/#comment-1199</guid>
		<description>@david:

Sorry. I should have tested first. The problem is that I was playing pretty foot-loose with my error checking because the &quot;not&quot; operator cleaned up any messes all by itself.

When I check the color of the previous record, I don&#039;t bother to make sure there &lt;em&gt;is&lt;/em&gt; a previous record. This works fine in the 1/0/1/0 case, but the &lt;code&gt;mod&lt;/code&gt; function isn&#039;t happy with this.

So here is a revised version that works properly:

&lt;pre&gt;&lt;code&gt;
Let(
  [previous_record = Get(RecordNumber) - 1;
  previous_color = If (previous_record = 0, 0, GetNthRecord(_COLOR; previous_record))];

  If(GetNthRecord ( DATE ; previous_record ) = DATE;
     previous_color;
     Mod(previous_color + 1; 4)
  )
)&lt;/code&gt;&lt;/pre&gt;

Let me know if that works for you.

Geoff</description>
		<content:encoded><![CDATA[<p>@david:</p>
<p>Sorry. I should have tested first. The problem is that I was playing pretty foot-loose with my error checking because the &#8220;not&#8221; operator cleaned up any messes all by itself.</p>
<p>When I check the color of the previous record, I don&#8217;t bother to make sure there <em>is</em> a previous record. This works fine in the 1/0/1/0 case, but the <code>mod</code> function isn&#8217;t happy with this.</p>
<p>So here is a revised version that works properly:</p>
<pre><code>
Let(
  [previous_record = Get(RecordNumber) - 1;
  previous_color = If (previous_record = 0, 0, GetNthRecord(_COLOR; previous_record))];

  If(GetNthRecord ( DATE ; previous_record ) = DATE;
     previous_color;
     Mod(previous_color + 1; 4)
  )
)</code></pre>
<p>Let me know if that works for you.</p>
<p>Geoff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Zakary</title>
		<link>http://sixfriedrice.com/wp/alternating-colors/comment-page-1/#comment-1198</link>
		<dc:creator>David Zakary</dc:creator>
		<pubDate>Fri, 06 Jun 2008 20:22:24 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/alternating-colors/#comment-1198</guid>
		<description>Tried the &#039;mod&#039; version as you suggested. I&#039;m getting question marks in the field as soon as I do.</description>
		<content:encoded><![CDATA[<p>Tried the &#8216;mod&#8217; version as you suggested. I&#8217;m getting question marks in the field as soon as I do.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

