<?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: Creating Random Numbers in FileMaker</title>
	<atom:link href="http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/feed/" rel="self" type="application/rss+xml" />
	<link>http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/</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: Michiel</title>
		<link>http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/comment-page-1/#comment-2099</link>
		<dc:creator>Michiel</dc:creator>
		<pubDate>Wed, 14 Dec 2011 23:46:59 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/#comment-2099</guid>
		<description>Slight correction... Had an instance where the period (.) showed from the Random command (16.158J5), so I added a &#039;0&#039; to the * 100000.

Left ( Random * 1000000 ; 3 ) &amp; Left ( Random * 1000000 ; 3 ) &amp; Middle ( “ABCDEFGHJKLMNPQRSTUVWXYZ” ; ( Round ( Random * 23 ; 0 ) + 1 ) ; 1 ) &amp; Left ( Random * 100000 ; 1 )</description>
		<content:encoded><![CDATA[<p>Slight correction&#8230; Had an instance where the period (.) showed from the Random command (16.158J5), so I added a &#8216;0&#8242; to the * 100000.</p>
<p>Left ( Random * 1000000 ; 3 ) &amp; Left ( Random * 1000000 ; 3 ) &amp; Middle ( “ABCDEFGHJKLMNPQRSTUVWXYZ” ; ( Round ( Random * 23 ; 0 ) + 1 ) ; 1 ) &amp; Left ( Random * 100000 ; 1 )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michiel</title>
		<link>http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/comment-page-1/#comment-2098</link>
		<dc:creator>Michiel</dc:creator>
		<pubDate>Wed, 14 Dec 2011 23:34:35 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/#comment-2098</guid>
		<description>Rather old post, but interesting... Check out this random sequence script, easily adaptable to any way or form. Super random creates numbers like this:

723883A1
619590H5
205985B6
635182T1
627171U9

I took out the letters &quot;O&quot; and &quot;I&quot; as these confuse with 0 and 1.

Here it is...

Left ( Random * 100000 ; 3 ) &amp; Left ( Random * 100000 ; 3 ) &amp; Middle ( &quot;ABCDEFGHJKLMNPQRSTUVWXYZ&quot; ; ( Round ( Random * 23 ; 0 ) + 1 ) ; 1 ) &amp; Left ( Random * 100000 ; 1 )</description>
		<content:encoded><![CDATA[<p>Rather old post, but interesting&#8230; Check out this random sequence script, easily adaptable to any way or form. Super random creates numbers like this:</p>
<p>723883A1<br />
619590H5<br />
205985B6<br />
635182T1<br />
627171U9</p>
<p>I took out the letters &#8220;O&#8221; and &#8220;I&#8221; as these confuse with 0 and 1.</p>
<p>Here it is&#8230;</p>
<p>Left ( Random * 100000 ; 3 ) &amp; Left ( Random * 100000 ; 3 ) &amp; Middle ( &#8220;ABCDEFGHJKLMNPQRSTUVWXYZ&#8221; ; ( Round ( Random * 23 ; 0 ) + 1 ) ; 1 ) &amp; Left ( Random * 100000 ; 1 )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michiel</title>
		<link>http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/comment-page-1/#comment-2097</link>
		<dc:creator>Michiel</dc:creator>
		<pubDate>Wed, 14 Dec 2011 22:42:55 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/#comment-2097</guid>
		<description>How about...

Right ( Random ; 6 )

Gives a nice fixed 6 digit number.</description>
		<content:encoded><![CDATA[<p>How about&#8230;</p>
<p>Right ( Random ; 6 )</p>
<p>Gives a nice fixed 6 digit number.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: miles</title>
		<link>http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/comment-page-1/#comment-2036</link>
		<dc:creator>miles</dc:creator>
		<pubDate>Fri, 11 Feb 2011 07:54:42 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/#comment-2036</guid>
		<description>Hmmm...

  Let(
    Num = Int ( Random * ( Maximum - Minimum + 1 ) ) + Minimum;
    If( Num == Minimum ; Num ; RandomNumber( Minimum, Maximum ) )
  )

Does not work.  Its throwing an error....

what is MAX and MIN, those are fields ?

Miles.</description>
		<content:encoded><![CDATA[<p>Hmmm&#8230;</p>
<p>  Let(<br />
    Num = Int ( Random * ( Maximum &#8211; Minimum + 1 ) ) + Minimum;<br />
    If( Num == Minimum ; Num ; RandomNumber( Minimum, Maximum ) )<br />
  )</p>
<p>Does not work.  Its throwing an error&#8230;.</p>
<p>what is MAX and MIN, those are fields ?</p>
<p>Miles.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ritche M</title>
		<link>http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/comment-page-1/#comment-1942</link>
		<dc:creator>Ritche M</dc:creator>
		<pubDate>Thu, 19 Aug 2010 03:42:14 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/#comment-1942</guid>
		<description>Thanks for the function above. I&#039;ll use it to generate random numbers.</description>
		<content:encoded><![CDATA[<p>Thanks for the function above. I&#8217;ll use it to generate random numbers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John DeMillion</title>
		<link>http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/comment-page-1/#comment-1935</link>
		<dc:creator>John DeMillion</dc:creator>
		<pubDate>Sun, 27 Jun 2010 07:15:33 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/#comment-1935</guid>
		<description>FileMaker&#039;s Random function did indeed originally include &quot;1&quot; as a potential return value, but this was eventually recognized as the bug that it is, and in 10.0v3 they finally (!) corrected it.

See http://help.filemaker.com/app/answers/detail/a_id/5464/</description>
		<content:encoded><![CDATA[<p>FileMaker&#8217;s Random function did indeed originally include &#8220;1&#8243; as a potential return value, but this was eventually recognized as the bug that it is, and in 10.0v3 they finally (!) corrected it.</p>
<p>See <a href="http://help.filemaker.com/app/answers/detail/a_id/5464/" rel="nofollow">http://help.filemaker.com/app/answers/detail/a_id/5464/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: patricia Schiffman</title>
		<link>http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/comment-page-1/#comment-1925</link>
		<dc:creator>patricia Schiffman</dc:creator>
		<pubDate>Sun, 21 Mar 2010 23:23:26 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/#comment-1925</guid>
		<description>Found this for version 11 help

Returns a number between zero and one, including zero, but not including one.</description>
		<content:encoded><![CDATA[<p>Found this for version 11 help</p>
<p>Returns a number between zero and one, including zero, but not including one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: patricia Schiffman</title>
		<link>http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/comment-page-1/#comment-1924</link>
		<dc:creator>patricia Schiffman</dc:creator>
		<pubDate>Sun, 21 Mar 2010 23:18:54 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/#comment-1924</guid>
		<description>I ran into the same question Johnathan had about Random and the same problem. Below is what I found addressed in FKB. To include 1 or 0 or not that appears to be the on going question. Is the test based on v3 or 10.0.

FileMaker Pro 10.0v3 addressed an issue where the &quot;Random&quot; calculation function could generate non-random values on certain machines. The &quot;Random&quot; calculation will now generate values greater than or equal to 0 and less than 1. The value will never be 1.

In versions prior to FileMaker Pro 10.0v3, the &quot;Random&quot; function returns &quot;a random number between zero and one&quot; including &quot;zero and one&quot;.

patricia</description>
		<content:encoded><![CDATA[<p>I ran into the same question Johnathan had about Random and the same problem. Below is what I found addressed in FKB. To include 1 or 0 or not that appears to be the on going question. Is the test based on v3 or 10.0.</p>
<p>FileMaker Pro 10.0v3 addressed an issue where the &#8220;Random&#8221; calculation function could generate non-random values on certain machines. The &#8220;Random&#8221; calculation will now generate values greater than or equal to 0 and less than 1. The value will never be 1.</p>
<p>In versions prior to FileMaker Pro 10.0v3, the &#8220;Random&#8221; function returns &#8220;a random number between zero and one&#8221; including &#8220;zero and one&#8221;.</p>
<p>patricia</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/comment-page-1/#comment-1865</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Mon, 23 Nov 2009 21:02:09 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/#comment-1865</guid>
		<description>Garry:

That is a slightly different problem because you want to remove the number from the available set once it has been used. One way to do it would be to set up a list of number from 1-179 like this:

&lt;pre&gt;&lt;code&gt;Set Variable [ $i, 1 ]
Loop
   Set Variable [ $choices, $choices &amp; $i &amp; ¶ ]
   Set Variable [ $i, $i + 1 ]
   Exit Loop If [ $i &gt; Get(FoundCount) ]
End Loop&lt;/code&gt;&lt;/pre&gt;

Then randomly select one and remove it from the list:

&lt;pre&gt;&lt;code&gt;Set Variable [ $rand, RandomNumber(1, ValueCount($choices)) ]
Set Variable [ $one, GetValue($choices, $rand) ]
Set Variable [ $choices, LeftValues($choices, $rand - 1) &amp; MiddleValues($choices, $rand + 1, ValueCount($choices))&lt;/code&gt;&lt;/pre&gt;

Do this in a loop and you should get them randomly assigned.

This is all untested code.

Geoff</description>
		<content:encoded><![CDATA[<p>Garry:</p>
<p>That is a slightly different problem because you want to remove the number from the available set once it has been used. One way to do it would be to set up a list of number from 1-179 like this:</p>
<pre><code>Set Variable [ $i, 1 ]
Loop
   Set Variable [ $choices, $choices &#038; $i &#038; ¶ ]
   Set Variable [ $i, $i + 1 ]
   Exit Loop If [ $i > Get(FoundCount) ]
End Loop</code></pre>
<p>Then randomly select one and remove it from the list:</p>
<pre><code>Set Variable [ $rand, RandomNumber(1, ValueCount($choices)) ]
Set Variable [ $one, GetValue($choices, $rand) ]
Set Variable [ $choices, LeftValues($choices, $rand - 1) &#038; MiddleValues($choices, $rand + 1, ValueCount($choices))</code></pre>
<p>Do this in a loop and you should get them randomly assigned.</p>
<p>This is all untested code.</p>
<p>Geoff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Garry Bargsley</title>
		<link>http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/comment-page-1/#comment-1859</link>
		<dc:creator>Garry Bargsley</dc:creator>
		<pubDate>Wed, 04 Nov 2009 19:00:55 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/creating-random-numbers-in-filemaker-pro/#comment-1859</guid>
		<description>How can you incorporate this for a found set of records.  So I have a found set of 179 records and I want to randomly assign a value to each record, so basically 1 to 179 without duplication.

Can this custom function work with this or is that something out of the scope?</description>
		<content:encoded><![CDATA[<p>How can you incorporate this for a found set of records.  So I have a found set of 179 records and I want to randomly assign a value to each record, so basically 1 to 179 without duplication.</p>
<p>Can this custom function work with this or is that something out of the scope?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

