<?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: Limiting Checkbox and Radio Button Choices</title>
	<atom:link href="http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/feed/" rel="self" type="application/rss+xml" />
	<link>http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/</link>
	<description>smart business solutions</description>
	<lastBuildDate>Fri, 18 May 2012 01:30:19 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Lindee</title>
		<link>http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/comment-page-1/#comment-2088</link>
		<dc:creator>Lindee</dc:creator>
		<pubDate>Sat, 05 Nov 2011 22:11:50 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/#comment-2088</guid>
		<description>Is there a way to get this technique to work with a drop down list? 

Drop down lists with auto-complete enabled make it easy to pick a value without your hands leaving the keyboard. When using this technique on a list, the calculation is not applied until you click out of the field and the value that is left in the field is the bottom most one in the list not necessarily the last one selected. Doesn&#039;t matter if they are shift-click selected or command-click selected.

How can you capture the values as they are selected?

Thanks! Lindee</description>
		<content:encoded><![CDATA[<p>Is there a way to get this technique to work with a drop down list? </p>
<p>Drop down lists with auto-complete enabled make it easy to pick a value without your hands leaving the keyboard. When using this technique on a list, the calculation is not applied until you click out of the field and the value that is left in the field is the bottom most one in the list not necessarily the last one selected. Doesn&#8217;t matter if they are shift-click selected or command-click selected.</p>
<p>How can you capture the values as they are selected?</p>
<p>Thanks! Lindee</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/comment-page-1/#comment-1940</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Fri, 30 Jul 2010 16:14:37 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/#comment-1940</guid>
		<description>I have a small db and I have a value list with radio buttons. Is there a script that can be written to reset the radio buttons back to a value on the value list?</description>
		<content:encoded><![CDATA[<p>I have a small db and I have a value list with radio buttons. Is there a script that can be written to reset the radio buttons back to a value on the value list?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Troy</title>
		<link>http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/comment-page-1/#comment-1369</link>
		<dc:creator>Troy</dc:creator>
		<pubDate>Sat, 22 Nov 2008 05:16:09 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/#comment-1369</guid>
		<description>Wow...  just the simple revelation that multiple items are understood by FM to be &quot;return&quot; delimited ...   (I had tried all kinds of things, like assigning lists to the cell, etc... to no avail.)

solved my prob.  Thanks!
Troy</description>
		<content:encoded><![CDATA[<p>Wow&#8230;  just the simple revelation that multiple items are understood by FM to be &#8220;return&#8221; delimited &#8230;   (I had tried all kinds of things, like assigning lists to the cell, etc&#8230; to no avail.)</p>
<p>solved my prob.  Thanks!<br />
Troy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/comment-page-1/#comment-1309</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Wed, 24 Sep 2008 15:55:24 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/#comment-1309</guid>
		<description>ZSmith:

1: If you mean you want the link to change color as you click on it, I don&#039;t think its possible in any straight forward way. If you mean its color should be different after you have clicked it, then you can do this with Conditional Formatting. You just need some way to keep track of whether or not the link has been clicked. This could be done with a global variable, a value stored in a field somewhere, etc... 

For example, when they click the button, you could run a script that sets a variable called $$link_clicked to true, and then go to the layout. Then apply conditional formatting to the button with a condition formula of:

   $$link_clicked

And apply an alternate text color. Should work just fine.

2: For your radio buttons, you just need to set the value in the field to the current user&#039;s name, which you can get from the Get(AccountName) function. You can put this in an auto-enter calculation, or set the field with a script.

Hope this helps :)

Geoff</description>
		<content:encoded><![CDATA[<p>ZSmith:</p>
<p>1: If you mean you want the link to change color as you click on it, I don&#8217;t think its possible in any straight forward way. If you mean its color should be different after you have clicked it, then you can do this with Conditional Formatting. You just need some way to keep track of whether or not the link has been clicked. This could be done with a global variable, a value stored in a field somewhere, etc&#8230; </p>
<p>For example, when they click the button, you could run a script that sets a variable called $$link_clicked to true, and then go to the layout. Then apply conditional formatting to the button with a condition formula of:</p>
<p>   $$link_clicked</p>
<p>And apply an alternate text color. Should work just fine.</p>
<p>2: For your radio buttons, you just need to set the value in the field to the current user&#8217;s name, which you can get from the Get(AccountName) function. You can put this in an auto-enter calculation, or set the field with a script.</p>
<p>Hope this helps <img src='http://sixfriedrice.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Geoff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ZSmith</title>
		<link>http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/comment-page-1/#comment-1305</link>
		<dc:creator>ZSmith</dc:creator>
		<pubDate>Tue, 23 Sep 2008 20:20:34 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/#comment-1305</guid>
		<description>I would like to know if the following is possible? Im new to fm


I created a link between two layouts and I would like the link to change colors when it is selected. How do I achieve this affect in FP9?

I also have three radiobuttons which contain names. I would like to know if its possible to automatically select the correct radio button if the user name that logins matches one of the names in the radio button selection?</description>
		<content:encoded><![CDATA[<p>I would like to know if the following is possible? Im new to fm</p>
<p>I created a link between two layouts and I would like the link to change colors when it is selected. How do I achieve this affect in FP9?</p>
<p>I also have three radiobuttons which contain names. I would like to know if its possible to automatically select the correct radio button if the user name that logins matches one of the names in the radio button selection?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Smith</title>
		<link>http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/comment-page-1/#comment-1148</link>
		<dc:creator>Alan Smith</dc:creator>
		<pubDate>Wed, 28 May 2008 06:57:49 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/#comment-1148</guid>
		<description>Disregard my last comment. The issue I was having seems to be when the field is in a portal. Suggestions?</description>
		<content:encoded><![CDATA[<p>Disregard my last comment. The issue I was having seems to be when the field is in a portal. Suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Smith</title>
		<link>http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/comment-page-1/#comment-1147</link>
		<dc:creator>Alan Smith</dc:creator>
		<pubDate>Wed, 28 May 2008 06:16:40 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/#comment-1147</guid>
		<description>Great solution. Is there a solution for a number field? For example: Radio buttons: (0,1,2)</description>
		<content:encoded><![CDATA[<p>Great solution. Is there a solution for a number field? For example: Radio buttons: (0,1,2)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/comment-page-1/#comment-1002</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Sat, 05 Apr 2008 17:51:22 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/#comment-1002</guid>
		<description>@nkhil: I&#039;m not exactly sure what you mean. I&#039;m guessing you have a checkbox field, and a button on your layout. You want a click on the button to uncheck two of the checkboxes. Is that right?

If you want the button to clear &lt;em&gt;all&lt;/em&gt; of the checkboxes, that&#039;s a breeze. Just clear the field. For instance, if your checkbox field is called &lt;code&gt;Colors&lt;/code&gt; then you can use this simple step:

&lt;pre&gt;&lt;code&gt;Set Field [ Colors; &quot;&quot; ]&lt;/code&gt;&lt;/pre&gt;

If the field has several checkboxes, and you want to clear just two specific values, then it gets a little more complex. As mentioned in the article, FileMaker stores the data in the field with each checkbox value on one line. So you need to find a way to remove specific lines of text from the field. You can do this with the &lt;code&gt;Substitute&lt;/code&gt; function. For instance, if you want to uncheck &lt;code&gt;Red&lt;/code&gt; and &lt;code&gt;Blue&lt;/code&gt; from your &lt;code&gt;Colors&lt;/code&gt; field, you could essentially do this:

&lt;pre&gt;&lt;code&gt;Set Field [ Colors; Substitute(Colors, &quot;Red&quot;, &quot;&quot;) ]
Set Field [ Colors; Substitute(Colors, &quot;Blue&quot;, &quot;&quot;) ]&lt;/code&gt;&lt;/pre&gt;

That two-line script says to replace the word &quot;Red&quot; in the field with nothing, and then do the same with &quot;Blue&quot;.

First, you can streamline this a little if you want by doing both substitutions in one step, like this:

&lt;pre&gt;&lt;code&gt;Set Field [ Colors; Substitute(Colors; [&quot;Red&quot;, &quot;&quot;]; [&quot;Blue&quot;, &quot;&quot;]) ]&lt;/code&gt;&lt;/pre&gt;

The &lt;code&gt;Substitute&lt;/code&gt; function lest you pass in multiple pairs like this, and it will replace them all. 

But you also have another problem. Suppose your &lt;code&gt;Colors&lt;/code&gt; field has these values:

&lt;pre&gt;&lt;code&gt;Red
Green
Blue
Blueish&lt;/code&gt;&lt;/pre&gt;

When your script removes the word &quot;Blue&quot; from this value, it will find it in two places (&quot;Blue&quot; and the first part of &quot;Blueish&quot;). If this is a problem for your data set, you&#039;ll have to protect against it. You only want to replace &quot;Blue&quot; when it is on a line all by itself. In other words, when there is an ¶ right before it and another ¶ right after it. So you can &lt;em&gt;almost&lt;/em&gt; get away with this:

&lt;pre&gt;&lt;code&gt;Set Field [ Colors; Substitute(Colors, &quot;¶Blue¶&quot;, &quot;¶&quot;) ]&lt;/code&gt;&lt;/pre&gt;

This version says to replace &quot;Blue&quot; when it is preceded and followed by new lines with a single return, effectively wiping it out. But this version is &lt;em&gt;still&lt;/em&gt; not quite right. What if &quot;Blue&quot; is the &lt;em&gt;first&lt;/em&gt; item in the list? Then it won&#039;t have an ¶ before it. Likewise, if it is the last item, it won&#039;t have one after it. So you have to get creative: force your data into the form you want, do the substitution, and then clean it up when your done. This script does just that:

&lt;pre&gt;&lt;code&gt;Set Field [ Colors, ¶ &amp; Colors &amp; ¶ ]
Set Field [ Colors, Substitute(Colors; &quot;¶Blue¶&quot; &quot;¶&quot;) ]
Set Field [ Colors, Substitute(Colors; &quot;¶Red¶&quot;, &quot;¶&quot;) ]
Set Field [ Colors, Middle(Colors, 2, Length(Colors) - 1) ]
&lt;/code&gt;&lt;/pre&gt;

As before, this script could be written in fewer steps if you want (in fact, it can be written in &lt;em&gt;one&lt;/em&gt; step) but I wanted the steps to be explicit here.

Hope this helps.

Geoff</description>
		<content:encoded><![CDATA[<p>@nkhil: I&#8217;m not exactly sure what you mean. I&#8217;m guessing you have a checkbox field, and a button on your layout. You want a click on the button to uncheck two of the checkboxes. Is that right?</p>
<p>If you want the button to clear <em>all</em> of the checkboxes, that&#8217;s a breeze. Just clear the field. For instance, if your checkbox field is called <code>Colors</code> then you can use this simple step:</p>
<pre><code>Set Field [ Colors; "" ]</code></pre>
<p>If the field has several checkboxes, and you want to clear just two specific values, then it gets a little more complex. As mentioned in the article, FileMaker stores the data in the field with each checkbox value on one line. So you need to find a way to remove specific lines of text from the field. You can do this with the <code>Substitute</code> function. For instance, if you want to uncheck <code>Red</code> and <code>Blue</code> from your <code>Colors</code> field, you could essentially do this:</p>
<pre><code>Set Field [ Colors; Substitute(Colors, "Red", "") ]
Set Field [ Colors; Substitute(Colors, "Blue", "") ]</code></pre>
<p>That two-line script says to replace the word &#8220;Red&#8221; in the field with nothing, and then do the same with &#8220;Blue&#8221;.</p>
<p>First, you can streamline this a little if you want by doing both substitutions in one step, like this:</p>
<pre><code>Set Field [ Colors; Substitute(Colors; ["Red", ""]; ["Blue", ""]) ]</code></pre>
<p>The <code>Substitute</code> function lest you pass in multiple pairs like this, and it will replace them all. </p>
<p>But you also have another problem. Suppose your <code>Colors</code> field has these values:</p>
<pre><code>Red
Green
Blue
Blueish</code></pre>
<p>When your script removes the word &#8220;Blue&#8221; from this value, it will find it in two places (&#8221;Blue&#8221; and the first part of &#8220;Blueish&#8221;). If this is a problem for your data set, you&#8217;ll have to protect against it. You only want to replace &#8220;Blue&#8221; when it is on a line all by itself. In other words, when there is an ¶ right before it and another ¶ right after it. So you can <em>almost</em> get away with this:</p>
<pre><code>Set Field [ Colors; Substitute(Colors, "¶Blue¶", "¶") ]</code></pre>
<p>This version says to replace &#8220;Blue&#8221; when it is preceded and followed by new lines with a single return, effectively wiping it out. But this version is <em>still</em> not quite right. What if &#8220;Blue&#8221; is the <em>first</em> item in the list? Then it won&#8217;t have an ¶ before it. Likewise, if it is the last item, it won&#8217;t have one after it. So you have to get creative: force your data into the form you want, do the substitution, and then clean it up when your done. This script does just that:</p>
<pre><code>Set Field [ Colors, ¶ &#038; Colors &#038; ¶ ]
Set Field [ Colors, Substitute(Colors; "¶Blue¶" "¶") ]
Set Field [ Colors, Substitute(Colors; "¶Red¶", "¶") ]
Set Field [ Colors, Middle(Colors, 2, Length(Colors) - 1) ]
</code></pre>
<p>As before, this script could be written in fewer steps if you want (in fact, it can be written in <em>one</em> step) but I wanted the steps to be explicit here.</p>
<p>Hope this helps.</p>
<p>Geoff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nikhil</title>
		<link>http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/comment-page-1/#comment-1001</link>
		<dc:creator>nikhil</dc:creator>
		<pubDate>Sat, 05 Apr 2008 16:50:28 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/#comment-1001</guid>
		<description>what will the code to remove two check box on clicking a buttton  run time.</description>
		<content:encoded><![CDATA[<p>what will the code to remove two check box on clicking a buttton  run time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manuel Klimis</title>
		<link>http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/comment-page-1/#comment-991</link>
		<dc:creator>Manuel Klimis</dc:creator>
		<pubDate>Thu, 20 Mar 2008 17:56:48 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/limiting-checkbox-and-radio-button-choices/#comment-991</guid>
		<description>Very good, nice , thank you, great service.</description>
		<content:encoded><![CDATA[<p>Very good, nice , thank you, great service.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

